Undo last change but correct comment saying < 0 is ok for size type.

This commit is contained in:
Ulrich Drepper 1999-08-20 23:44:59 +00:00
parent 863ac339aa
commit a2c3a8a754

View File

@ -204,7 +204,7 @@ extern char *alloca ();
bytes of BUF. Returns NULL if the directory couldn't be determined or 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 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, 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_RETURN_TYPE
__getcwd (buf, size) __getcwd (buf, size)
@ -226,7 +226,7 @@ __getcwd (buf, size)
int prev_errno = errno; int prev_errno = errno;
size_t allocated = size; size_t allocated = size;
if (size <= 0) if (size == 0)
{ {
if (buf != NULL) if (buf != NULL)
{ {
@ -363,7 +363,7 @@ __getcwd (buf, size)
if ((size_t) (pathp - path) <= namlen) if ((size_t) (pathp - path) <= namlen)
{ {
if (size > 0) if (size != 0)
{ {
(void) __closedir (dirstream); (void) __closedir (dirstream);
__set_errno (ERANGE); __set_errno (ERANGE);