diff options
Diffstat (limited to 'Documentation/lguest/lguest.c')
-rw-r--r-- | Documentation/lguest/lguest.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 0f23d67f958f..bec5a32e4095 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -486,9 +486,12 @@ static void concat(char *dst, char *args[]) | |||
486 | unsigned int i, len = 0; | 486 | unsigned int i, len = 0; |
487 | 487 | ||
488 | for (i = 0; args[i]; i++) { | 488 | for (i = 0; args[i]; i++) { |
489 | if (i) { | ||
490 | strcat(dst+len, " "); | ||
491 | len++; | ||
492 | } | ||
489 | strcpy(dst+len, args[i]); | 493 | strcpy(dst+len, args[i]); |
490 | strcat(dst+len, " "); | 494 | len += strlen(args[i]); |
491 | len += strlen(args[i]) + 1; | ||
492 | } | 495 | } |
493 | /* In case it's empty. */ | 496 | /* In case it's empty. */ |
494 | dst[len] = '\0'; | 497 | dst[len] = '\0'; |