From: Ulrich Drepper Date: Fri, 20 Aug 1999 23:44:59 +0000 (+0000) Subject: Undo last change but correct comment saying < 0 is ok for size type. X-Git-Tag: cvs/glibc_2-1-2~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2c3a8a75485aa060f7fa8291298b3ab02c44250;p=thirdparty%2Fglibc.git Undo last change but correct comment saying < 0 is ok for size type. --- diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c index e79598b045f..617d340e4fc 100644 --- a/sysdeps/posix/getcwd.c +++ b/sysdeps/posix/getcwd.c @@ -204,7 +204,7 @@ extern char *alloca (); bytes of BUF. Returns NULL if the directory couldn't be determined or SIZE was too small. If successful, returns BUF. In GNU, if BUF is NULL, an array is allocated with `malloc'; the array is SIZE bytes long, - unless SIZE <= 0, in which case it is as big as necessary. */ + unless SIZE == 0, in which case it is as big as necessary. */ GETCWD_RETURN_TYPE __getcwd (buf, size) @@ -226,7 +226,7 @@ __getcwd (buf, size) int prev_errno = errno; size_t allocated = size; - if (size <= 0) + if (size == 0) { if (buf != NULL) { @@ -363,7 +363,7 @@ __getcwd (buf, size) if ((size_t) (pathp - path) <= namlen) { - if (size > 0) + if (size != 0) { (void) __closedir (dirstream); __set_errno (ERANGE);