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 6f06058c5ae72a80c71de217c3c105cfe7a08b18..6722308d1a98ac0d1005f0fa4abc5287f4f3caf4 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 6b7331d198e9d8b9b0596acbfdab443d227682a3..422b178809557c13345c312db96ec1cb893e50e6 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. */