aboutsummaryrefslogtreecommitdiff
path: root/libbb/xgetcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xgetcwd.c')
-rw-r--r--libbb/xgetcwd.c4
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
20char * 20char *
21xgetcwd(char *cwd) 21xrealloc_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) {