OSDN Git Service

sparc: Remove redundant tests in boot_flags_init().
authorDavid S. Miller <davem@davemloft.net>
Wed, 3 May 2017 15:28:48 +0000 (08:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 May 2017 15:28:48 +0000 (08:28 -0700)
The test:

*commands && *commands == ' '

is equivalent to:

*commands == ' '

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/setup_32.c
arch/sparc/kernel/setup_64.c

index 6f06058..6722308 100644 (file)
@@ -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. */
index 6b7331d..422b178 100644 (file)
@@ -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. */