summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-02-23 21:14:12 +0000
committerJim Meyering <jim@meyering.net>1995-02-23 21:14:12 +0000
commit6812f6190090784f14391cf3b681b3fa67aa00d1 (patch)
treed6c366b7c6c2317322763700583601df8847fa5f /src
parentaeebbd038cba80ae8d58fbfccfcdf3fa79782d13 (diff)
downloadcoreutils-6812f6190090784f14391cf3b681b3fa67aa00d1.tar.xz
(restore_cwd): Test whether fchdir return value is non-zero, not negative.
Be consistent!
Diffstat (limited to 'src')
-rw-r--r--src/du.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/du.c b/src/du.c
index de78b3171..9128547f6 100644
--- a/src/du.c
+++ b/src/du.c
@@ -244,7 +244,7 @@ restore_cwd (cwd, dest, current)
{
if (cwd->desc >= 0)
{
- if (fchdir (cwd->desc) < 0)
+ if (fchdir (cwd->desc))
error (1, errno, "cannot return to %s%s%s", dest,
(current ? " from " : ""),
(current ? current : ""));