lib: rhashtable: Correct self-assignment in rhashtable.c
Subsystems (5)
PATCH 1/1 lib: rhashtable: Correct self-assignment in rhashtable.c
In file lib/rhashtable.c line 777, skip variable is assigned to itself. The following error was observed:
lib/rhashtable.c:777:41: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] error, forbidden
warning: rhashtable.c:777
This error was found when compiling with Clang 6.0. Change it to iter->skip.
--- lib/rhashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/rhashtable.c +1 -1
@@ -774,7 +774,7 @@ int rhashtable_walk_start_check(struct rhashtable_iter *iter) skip++;if (list == iter->list) { iter->p = p; - skip = skip; + iter->skip = skip; goto found; } }
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
From: Rishabh Bhatnagar <[email protected]>
Date: Mon, 2 Jul 2018 09:35:34 -0700
Quoted 11 lines
In file
lib/rhashtable.cline 777, skip variable is assigned to itself. The following error was observed:
lib/rhashtable.c:777:41: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] error, forbidden
warning: rhashtable.c:777
This error was found when compiling with Clang 6.0. Change it toiter->skip.Signed-off-by Rishabh Bhatnagar <[email protected]>Acked-by Herbert Xu <[email protected]>Reviewed-by NeilBrown <[email protected]>
Applied, thanks.