X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=path.c;h=4d889473a78a2c6fa38a0b54a48fe55bd83e9b02;hb=f801477645146fd7eff018b4997b86dfa1a0767d;hp=d635470de1ad9f8a0f43e264d27f3d4c4b9b8705;hpb=0870ca7fabe6f25095431280e480859f7c66e8ab;p=git.git diff --git a/path.c b/path.c index d635470d..4d889473 100644 --- 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 {