lib:Remove repeated initialization
Subsystems (3)
PATCH 1/1 lib:Remove repeated initialization
The original code initializes 'entry' twice in line 3229 and 3232, which causes duplicate initialization issue. To fix this, we remove the initialization of 'entry' in line 3229.
--- lib/test_maple_tree.c | 1 - 1 file changed, 1 deletion(-)
lib/test_maple_tree.c +0 -1
@@ -3226,7 +3226,6 @@ static noinline void __init check_state_handling(struct maple_tree *mt)/* next: none -> active, skip value at location */ mas_set (&mas,0 ); - entry =mas_next (&mas,ULONG_MAX ); mas.node =MAS_NONE ; mas.offset =0 ; entry =mas_next (&mas,ULONG_MAX );
Signature · 1 line
2.25.1
Quoted 5 lines · Wang Ming
The original code initializes 'entry' twice in line 3229 and 3232, which causes duplicate initialization issue. To fix this, we remove the initialization of 'entry' in line 3229.
mas_next() has a side-effect; it's not a pure initialisation. Fix your tool.
Re: [PATCH] lib: Remove repeated “initialization” in check_state_handling()
In reply to Wang MingWould the information “test_maple_tree: …” be more appropriate for the subsystem specification in the patch subject?
Quoted 5 lines
The original code initializes 'entry' twice in line 3229 and 3232, which causes duplicate initialization issue. To fix this, we remove the initialization of 'entry' in line 3229.
* Why did you choose 41 characters as a line length maximum for your change description?
* Would you like to achieve reconsiderations of implementation details by other means than patches?
* How do you think about to clarify the usage of affected variable assignments better?
* What does hinder you to take any requirements from the Linux development documentation better into account?
Regards,
Markus