]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
mktemp: fix incorrect exit status from previous commit
authorPádraig Brady <P@draigBrady.com>
Mon, 7 Oct 2013 10:59:53 +0000 (11:59 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 7 Oct 2013 11:15:27 +0000 (12:15 +0100)
* src/mktemp.c (main): Use an exit() strategy consistent with the
previous clauses dealing with optional error messages to ensure
we exit with the correct status in all cases.
Prompted by the continuous integration build failure at:
http://hydra.nixos.org/build/6412979

src/mktemp.c

index 05530a31af2800367977469e35b046202d4950c2..074676f615d6b6152f4999709803636c3ffb3163 100644 (file)
@@ -335,7 +335,8 @@ main (int argc, char **argv)
           int saved_errno = errno;
           remove (dest_name);
           if (!suppress_file_err)
-            error (EXIT_FAILURE, saved_errno, _("write error"));
+            error (0, saved_errno, _("write error"));
+          status = EXIT_FAILURE;
         }
     }