Skip to content

Commit

Permalink
lib: rhashtable: Correct self-assignment in rhashtable.c
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Rishabh Bhatnagar <[email protected]>
Acked-by: Herbert Xu <[email protected]>
Reviewed-by: NeilBrown <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Rishabh Bhatnagar authored and davem330 committed Jul 3, 2018
1 parent d0fbad0 commit c643ecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rhashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c643ecf

Please sign in to comment.