version 1.36.2.1, 2005/08/14 22:08:44 |
version 1.45, 2007/10/26 19:48:14 |
Line 96 realpath(const char *path, char *resolve |
|
Line 96 realpath(const char *path, char *resolve |
|
|
|
/* If relative path, start from current working directory. */ |
/* If relative path, start from current working directory. */ |
if (*path != '/') { |
if (*path != '/') { |
if (getcwd(resolved, MAXPATHLEN) == NULL) { |
/* check for resolved pointer to appease coverity */ |
|
if (resolved && getcwd(resolved, MAXPATHLEN) == NULL) { |
p[0] = '.'; |
p[0] = '.'; |
p[1] = 0; |
p[1] = 0; |
return (NULL); |
return (NULL); |
|
|
goto loop; |
goto loop; |
} |
} |
|
|
|
|
|
#if defined(_FORTIFY_SOURCE) && !defined(__lint__) |
|
#undef getcwd |
|
#define getcwd _getcwd |
|
#endif |
|
|
char * |
char * |
getcwd(char *pt, size_t size) |
getcwd(char *pt, size_t size) |
{ |
{ |