diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-06-28 16:54:06 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-06-30 05:42:42 +0200 |
commit | 74fd304f2395e574a21cd06912f860771c82ee88 (patch) | |
tree | 6fa9bfd8b41108df27bf47716dde181cb7550767 /net/ipv6/route.c | |
parent | net: switchdev: add reminder near struct switchdev_notifier_fdb_info (diff) | |
download | linux-74fd304f2395e574a21cd06912f860771c82ee88.tar.xz linux-74fd304f2395e574a21cd06912f860771c82ee88.zip |
ipv6: remove redundant store to value after addition
There is no need to store the result of the addition back to variable count
after the addition. The store is redundant, replace += with just +
Cleans up clang scan build warning:
warning: Although the value stored to 'count' is used in the enclosing
expression, the value is never actually read from 'count'
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20220628145406.183527-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0be01a4d48c1..1d6f75eef4bd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5934,7 +5934,7 @@ int rt6_dump_route(struct fib6_info *rt, void *p_arg, unsigned int skip) rcu_read_unlock(); if (err) - return count += w.count; + return count + w.count; } return -1; |