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:
Steffen Prohaska
2007-11-25 23:29:03 +01:00
committed by Junio C Hamano
parent e0fda6abd1
commit ecf4831d89
4 changed files with 4 additions and 4 deletions

View File

@ -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);