summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd4c591)
raw | patch | inline | side by side (parent: dd4c591)
author | Matthias Lederhofer <matled@gmx.net> | |
Fri, 14 Jul 2006 16:37:06 +0000 (18:37 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 14 Jul 2006 18:32:39 +0000 (11:32 -0700) |
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git.c | patch | blob | history |
index 102735af6c0cfb496a04593ba466a9fbb18f693d..ee5a0e86a71119b5ac11c351a982e31c87649a15 100644 (file)
--- a/git.c
+++ b/git.c
fflush(stderr);
}
+ new_argv = realloc(new_argv, sizeof(char*) *
+ (count + *argcp + 1));
/* insert after command name */
- if (*argcp > 1) {
- new_argv = realloc(new_argv, sizeof(char*) *
- (count + *argcp));
- memcpy(new_argv + count, *argv + 1,
- sizeof(char*) * *argcp);
- }
+ memcpy(new_argv + count, *argv + 1,
+ sizeof(char*) * *argcp);
+ new_argv[count+*argcp] = NULL;
*argv = new_argv;
*argcp += count - 1;