Update the git-ls-tree documentation
[git.git] / git.c
diff --git a/git.c b/git.c
index 878c359..0975fc7 100644 (file)
--- a/git.c
+++ b/git.c
 # define PATH_MAX 4096
 #endif
 
+#ifdef NO_SETENV
+extern int gitsetenv(const char *, const char *, int);
+#endif
+
 static const char git_usage[] =
        "Usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--help] COMMAND [ ARGS ]";
 
@@ -188,7 +192,6 @@ static void prepend_to_path(const char *dir, int len)
        path_len = len + strlen(old_path) + 1;
 
        path = malloc(path_len + 1);
-       path[path_len + 1] = '\0';
 
        memcpy(path, dir, len);
        path[len] = ':';