Browse Source

sparc: Remove redundant tests in boot_flags_init().

The test:

	*commands && *commands == ' '

is equivalent to:

	*commands == ' '

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 8 years ago
parent
commit
8c64415cc1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      arch/sparc/kernel/setup_32.c
  2. 1 1
      arch/sparc/kernel/setup_64.c

+ 1 - 1
arch/sparc/kernel/setup_32.c

@@ -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. */

+ 1 - 1
arch/sparc/kernel/setup_64.c

@@ -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. */