Skip to content

Commit

Permalink
sparc: Remove redundant tests in boot_flags_init().
Browse files Browse the repository at this point in the history
The test:

	*commands && *commands == ' '

is equivalent to:

	*commands == ' '

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 3, 2017
1 parent 89c9fea commit 8c64415
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/sparc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static void __init boot_flags_init(char *commands)
{
while (*commands) {
/* Move to the start of the next "argument". */
while (*commands && *commands == ' ')
while (*commands == ' ')
commands++;

/* Process any command switches, otherwise skip it. */
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void __init boot_flags_init(char *commands)
{
while (*commands) {
/* Move to the start of the next "argument". */
while (*commands && *commands == ' ')
while (*commands == ' ')
commands++;

/* Process any command switches, otherwise skip it. */
Expand Down

0 comments on commit 8c64415

Please sign in to comment.