server-info.c: and two functions are not used anymore.
[git.git] / git.c
diff --git a/git.c b/git.c
index 619f25a..ee5048a 100644 (file)
--- a/git.c
+++ b/git.c
@@ -14,7 +14,7 @@
 #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[] =
@@ -192,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] = ':';
@@ -290,7 +289,7 @@ int main(int argc, char **argv, char **envp)
        len += snprintf(git_command + len, sizeof(git_command) - len,
                        "/git-%s", argv[i]);
        if (sizeof(git_command) <= len) {
-               fprintf(stderr, "git: command name given is too long (%d)\n", len);
+               fprintf(stderr, "git: command name given is too long.\n");
                exit(1);
        }