Use is_absolute_path() in diff-lib.c, lockfile.c, setup.c, trace.c
Using the helper function to test for absolute paths makes porting easier. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e0fda6abd1
commit
ecf4831d89
@ -94,7 +94,7 @@ static char *resolve_symlink(char *p, size_t s)
|
||||
return p;
|
||||
}
|
||||
|
||||
if (link[0] == '/') {
|
||||
if (is_absolute_path(link)) {
|
||||
/* absolute path simply replaces p */
|
||||
if (link_len < s)
|
||||
strcpy(p, link);
|
||||
|
Reference in New Issue
Block a user