summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRabin Vincent <rabinv@axis.com>2016-04-28 11:03:08 +0200
committerRalf Baechle <ralf@linux-mips.org>2016-05-13 14:02:20 +0200
commite54ad8c56258af3b414a3e5707a45c18f1db69e1 (patch)
tree09c0f4c84b8917bbcab406ffdb8836f7f85b8c7c
parent105c22c5cf3f420ce5ab792b3577ef330f1f6133 (diff)
downloadlinux-e54ad8c56258af3b414a3e5707a45c18f1db69e1.tar.gz
linux-e54ad8c56258af3b414a3e5707a45c18f1db69e1.tar.bz2
linux-e54ad8c56258af3b414a3e5707a45c18f1db69e1.zip
MIPS: Don't add leading spacing to command lines
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>
-rw-r--r--arch/mips/kernel/setup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 693e8d1a174c..38815f78c819 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -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