From: Jim Meyering Date: Thu, 23 Feb 1995 21:14:12 +0000 (+0000) Subject: (restore_cwd): Test whether fchdir return value is non-zero, not negative. X-Git-Tag: textutils-1_12_1~287 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6812f6190090784f14391cf3b681b3fa67aa00d1;p=thirdparty%2Fcoreutils.git (restore_cwd): Test whether fchdir return value is non-zero, not negative. Be consistent! --- diff --git a/src/du.c b/src/du.c index de78b31710..9128547f6f 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 : ""));