maint: fix warning 'possible use of "=" where "==" was intended'
authorBernhard Voelker <mail@bernhard-voelker.de>
Thu, 14 Jul 2011 10:56:23 +0000 (11:56 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 14 Jul 2011 10:56:23 +0000 (11:56 +0100)
* src/mktemp.c: maint: avoid warning by using the comma operator
rather than an always-true conditional (as suggested by Eric Blake).
Reported by Joachim Schmitz in http://debbugs.gnu.org/9064.

src/mktemp.c

index 2fe22b7..e592176 100644 (file)
@@ -344,7 +344,7 @@ main (int argc, char **argv)
       puts (dest_name);
       /* If we created a file, but then failed to output the file
          name, we should clean up the mess before failing.  */
-      if (!dry_run && (stdout_closed = true) && close_stream (stdout) != 0)
+      if (!dry_run && ((stdout_closed = true), close_stream (stdout) != 0))
         {
           int saved_errno = errno;
           remove (dest_name);