Use PATH_MAX instead of MAXPATHLEN
According to sys/paramh.h it's a "BSD name" for values defined in <limits.h>. Besides PATH_MAX seems to be more commonly used. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
eb950c192a
commit
095c424d08
4
entry.c
4
entry.c
@ -135,7 +135,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
|
||||
|
||||
int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath)
|
||||
{
|
||||
static char path[MAXPATHLEN+1];
|
||||
static char path[PATH_MAX + 1];
|
||||
struct stat st;
|
||||
int len = state->base_dir_len;
|
||||
|
||||
@ -172,5 +172,3 @@ int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath)
|
||||
create_directories(path, state);
|
||||
return write_entry(ce, path, state, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user