]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(restore_cwd): Test whether fchdir return value is non-zero, not negative.
authorJim Meyering <jim@meyering.net>
Thu, 23 Feb 1995 21:14:12 +0000 (21:14 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 23 Feb 1995 21:14:12 +0000 (21:14 +0000)
Be consistent!

src/du.c

index de78b317101efad67d048809f5ab171938c1b5d7..9128547f6f936b1afa15a9bb6f71fcad769c77e2 100644 (file)
--- 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 : ""));