Messages in this thread Patch in this message | | | From | cgel.zte@gmail ... | Subject | [PATCH linux] netfilter: Remove unnecessary ret assignment | Date | Thu, 30 Dec 2021 06:31:43 +0000 |
| |
From: luo penghao <luo.penghao@zte.com.cn>
Regardless of whether the subsequent (copy_to_user(user, &info, *len) != 0) holds, the value of ret will be assigned a new value.
The clang_analyzer complains as follows:
net/ipv6/netfilter/ip6_tables.c:
Value stored to 'ret' is never read
Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: luo penghao <luo.penghao@zte.com.cn> --- net/ipv6/netfilter/ip6_tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index a579ea1..92b90a2 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -986,7 +986,7 @@ static int get_info(struct net *net, void __user *user, const int *len) struct xt_table_info tmp; if (in_compat_syscall()) { - ret = compat_table_info(private, &tmp); + compat_table_info(private, &tmp); xt_compat_flush_offsets(AF_INET6); private = &tmp; } -- 2.15.2
| |