summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-07-04 22:53:25 +0100
committerakpm <akpm@linux-foundation.org>2022-07-13 13:44:44 -0700
commitb63c98b27e350bfb6990e28899bc2e82378cedbd (patch)
tree47b5d661d3693fec335fb430e8ee94f25bd8d2e8
parent9fc4adb1d9bb7b6a254bae0f492917cfbead8dd7 (diff)
downloadlinux-b63c98b27e350bfb6990e28899bc2e82378cedbd.tar.gz
linux-b63c98b27e350bfb6990e28899bc2e82378cedbd.tar.xz
lib/ts_bm.c: remove redundant store to variable consumed after addition
There is no need to store the result of the addition back to variable consumed after the addition. The store is redundant, replace += with just + Cleans up clang scan build warning: lib/ts_bm.c:83:11: warning: Although the value stored to 'consumed' is used in the enclosing expression, the value is never actually read from 'consumed' [deadcode.DeadStores] Link: https://lkml.kernel.org/r/20220704215325.600993-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--lib/ts_bm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ts_bm.c b/lib/ts_bm.c
index 4cf250031f0f..1f2234221dd1 100644
--- a/lib/ts_bm.c
+++ b/lib/ts_bm.c
@@ -80,7 +80,7 @@ static unsigned int bm_find(struct ts_config *conf, struct ts_state *state)
/* London calling... */
DEBUGP("found!\n");
- return consumed += (shift-(bm->patlen-1));
+ return consumed + (shift-(bm->patlen-1));
next: bs = bm->bad_shift[text[shift-i]];