git-var: constness and globalness cleanup.
[gitweb.git] / path.c
diff --git a/path.c b/path.c
index d635470de1ad9f8a0f43e264d27f3d4c4b9b8705..4d889473a78a2c6fa38a0b54a48fe55bd83e9b02 100644 (file)
--- a/path.c
+++ b/path.c
@@ -131,7 +131,7 @@ int validate_symref(const char *path)
        return -1;
 }
 
-static char *current_dir()
+static char *current_dir(void)
 {
        return getcwd(pathname, sizeof(pathname));
 }
@@ -181,7 +181,7 @@ char *enter_repo(char *path, int strict)
                return NULL;
 
        if (strict) {
-               if((path[0] != '/') || chdir(path) < 0)
+               if (chdir(path) < 0)
                        return NULL;
        }
        else {