diff options
Diffstat (limited to 'libbb/xgetcwd.c')
-rw-r--r-- | libbb/xgetcwd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/xgetcwd.c b/libbb/xgetcwd.c index 0ac450d3b..ec1d8f7a4 100644 --- a/libbb/xgetcwd.c +++ b/libbb/xgetcwd.c | |||
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | char * | 20 | char * |
21 | xgetcwd(char *cwd) | 21 | xrealloc_getcwd_or_warn(char *cwd) |
22 | { | 22 | { |
23 | char *ret; | 23 | char *ret; |
24 | unsigned path_max; | 24 | unsigned path_max; |
@@ -26,7 +26,7 @@ xgetcwd(char *cwd) | |||
26 | path_max = (unsigned) PATH_MAX; | 26 | path_max = (unsigned) PATH_MAX; |
27 | path_max += 2; /* The getcwd docs say to do this. */ | 27 | path_max += 2; /* The getcwd docs say to do this. */ |
28 | 28 | ||
29 | if (cwd==0) | 29 | if (cwd == NULL) |
30 | cwd = xmalloc(path_max); | 30 | cwd = xmalloc(path_max); |
31 | 31 | ||
32 | while ((ret = getcwd(cwd, path_max)) == NULL && errno == ERANGE) { | 32 | while ((ret = getcwd(cwd, path_max)) == NULL && errno == ERANGE) { |