]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[main] Parse args at end of /proc/cmdline properly
authorRay Strode <rstrode@redhat.com>
Tue, 27 Jul 2010 22:43:32 +0000 (18:43 -0400)
committerRay Strode <rstrode@redhat.com>
Tue, 27 Jul 2010 22:46:03 +0000 (18:46 -0400)
We weren't treating \n as an acceptable boundary

src/main.c

index 69a87455b5cb04435c8cd9e25f14da994ccc05f9..8cb81fd4f285680dadfd32530b7c69f087aab814 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <ctype.h>
 #include <limits.h>
 #include <dirent.h>
 #include <fcntl.h>
@@ -241,7 +242,7 @@ command_line_has_argument (const char *command_line,
     if (string == NULL)
       return false;
 
-    if (string[0] != ' ' && string[0] != '\0')
+    if (!isspace ((int) string[0]) && string[0] != '\0')
       return false;
 
     return true;