]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: Don't add leading spacing to command lines
authorRabin Vincent <rabinv@axis.com>
Thu, 28 Apr 2016 09:03:08 +0000 (11:03 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:02:20 +0000 (14:02 +0200)
The leading spaces don't affect functionality but are unnecessary.

Signed-off-by: Rabin Vincent <rabinv@axis.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13180/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/setup.c

index 693e8d1a174c4c87256cead0d53db349df183eb0..38815f78c819bac24bd986cbe7bfe4eaccc8d6f8 100644 (file)
@@ -673,13 +673,15 @@ static void __init arch_mem_init(char **cmdline_p)
                strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
 
        if (EXTEND_WITH_PROM && arcs_cmdline[0]) {
-               strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
+               if (boot_command_line[0])
+                       strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
                strlcat(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
        }
 
 #if defined(CONFIG_CMDLINE_BOOL)
        if (builtin_cmdline[0]) {
-               strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
+               if (boot_command_line[0])
+                       strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
                strlcat(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
        }
 #endif