]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Undo last change but correct comment saying < 0 is ok for size type.
authorUlrich Drepper <drepper@redhat.com>
Fri, 20 Aug 1999 23:44:59 +0000 (23:44 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 20 Aug 1999 23:44:59 +0000 (23:44 +0000)
sysdeps/posix/getcwd.c

index e79598b045f3005d4b7ea0e4cb961c958989ea2b..617d340e4fc3a81bcd7fc1ff04777bd6a5be4aef 100644 (file)
@@ -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);