summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kexec/kexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c
index d282ade..43d0189 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1007,9 +1007,9 @@ char *concat_cmdline(const char *base, const char *append)
char *cmdline;
if (!base && !append)
return NULL;
- if (append)
+ if (append && !base)
return xstrdup(append);
- if (base)
+ if (base && !append)
return xstrdup(base);
cmdline = xmalloc(strlen(base) + 1 + strlen(append) + 1);
strcpy(cmdline, base);