summaryrefslogtreecommitdiff
path: root/lib/getcwd.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-03-19 17:30:07 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2007-03-19 17:30:07 +0000
commit4b57b2a1cba017e176f1992304b8c2900bbdb569 (patch)
treeae05ef1ec7027063f316c5ffe0b1d083a04ac768 /lib/getcwd.c
parentcb4810b419d76a660b0b9b88f97be708e10606d5 (diff)
downloadgnulib-4b57b2a1cba017e176f1992304b8c2900bbdb569.tar.gz
* lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
If size is zero here, buf must be zero.
Diffstat (limited to 'lib/getcwd.c')
-rw-r--r--lib/getcwd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getcwd.c b/lib/getcwd.c
index f8567bd739..23b35de679 100644
--- a/lib/getcwd.c
+++ b/lib/getcwd.c
@@ -391,7 +391,7 @@ __getcwd (char *buf, size_t size)
used = dir + allocated - dirp;
memmove (dir, dirp, used);
- if (buf == NULL && size == 0)
+ if (size == 0)
/* Ensure that the buffer is only as large as necessary. */
buf = realloc (dir, used);