diff options
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -41,10 +41,12 @@ char *mkpath(const char *fmt, ...) char *git_path(const char *fmt, ...) { - const char *git_dir = gitenv(GIT_DIR_ENVIRONMENT) ? : DEFAULT_GIT_DIR_ENVIRONMENT; + const char *git_dir; va_list args; unsigned len; + git_dir = gitenv(GIT_DIR_ENVIRONMENT); + if (!git_dir) git_dir = DEFAULT_GIT_DIR_ENVIRONMENT; len = strlen(git_dir); if (len > PATH_MAX-100) return bad_path; |