diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-08-20 23:44:23 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-08-20 23:44:23 +0000 |
commit | a2b3aa73b8ed0f264be82cd8700d00abd52999f4 (patch) | |
tree | 790f567de160ea8a8faabfaeb662c6a1ab989b0d /sysdeps/unix/sysv/linux/getcwd.c | |
parent | 6570e194e60822d81d6df31e260985e6a13b0f2a (diff) | |
download | glibc-a2b3aa73b8ed0f264be82cd8700d00abd52999f4.tar.gz glibc-a2b3aa73b8ed0f264be82cd8700d00abd52999f4.tar.xz glibc-a2b3aa73b8ed0f264be82cd8700d00abd52999f4.zip |
Update.
* sysdeps/posix/getcwd.c: Correct comment saying < 0 is ok for size type. [PR libc/1269]
Diffstat (limited to 'sysdeps/unix/sysv/linux/getcwd.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/getcwd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/getcwd.c b/sysdeps/unix/sysv/linux/getcwd.c index 223cd310b8..cc7b987f9b 100644 --- a/sysdeps/unix/sysv/linux/getcwd.c +++ b/sysdeps/unix/sysv/linux/getcwd.c @@ -72,7 +72,7 @@ __getcwd (char *buf, size_t size) if (no_syscall_getcwd && !have_new_dcache) return generic_getcwd (buf, size); - if (size <= 0) + if (size == 0) { if (buf != NULL) { @@ -179,7 +179,7 @@ __getcwd (char *buf, size_t size) __set_errno (save_errno); /* Don't put restrictions on the length of the path unless the user does. */ - if (size <= 0) + if (size == 0) { free (path); path = NULL; @@ -187,7 +187,7 @@ __getcwd (char *buf, size_t size) result = generic_getcwd (path, size); - if (result == NULL && buf == NULL && size > 0) + if (result == NULL && buf == NULL && size != 0) free (path); return result; |