summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a26743)
raw | patch | inline | side by side (parent: 3a26743)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 4 Dec 2005 22:59:58 +0000 (14:59 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 4 Dec 2005 22:59:58 +0000 (14:59 -0800) |
gitsetenv as implemented in compat/setenv.c takes two const char*
and int; match that.
Also fix an incorrect attempt in prepend_to_path() to
NUL-terminate the string which stuffed the NUL character at one
past the end of allocation, and was not needed to begin with (we
copy the old_path string including the NUL which terminates it).
Signed-off-by: Junio C Hamano <junkio@cox.net>
and int; match that.
Also fix an incorrect attempt in prepend_to_path() to
NUL-terminate the string which stuffed the NUL character at one
past the end of allocation, and was not needed to begin with (we
copy the old_path string including the NUL which terminates it).
Signed-off-by: Junio C Hamano <junkio@cox.net>
git.c | patch | blob | history |
index 619f25acf50154a2b1f4e5e2522b89416d1286f1..0975fc7ac2673c952bfdf1372d2e22c001ecf7d5 100644 (file)
--- a/git.c
+++ b/git.c
#endif
#ifdef NO_SETENV
-extern int gitsetenv(char *name, char *value, int overwrite);
+extern int gitsetenv(const char *, const char *, int);
#endif
static const char git_usage[] =
path_len = len + strlen(old_path) + 1;
path = malloc(path_len + 1);
- path[path_len + 1] = '\0';
memcpy(path, dir, len);
path[len] = ':';