]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(usage): Use EXIT_SUCCESS, not 0, for clarity.
authorJim Meyering <jim@meyering.net>
Thu, 22 Jan 2004 21:04:26 +0000 (21:04 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 22 Jan 2004 21:04:26 +0000 (21:04 +0000)
(err): Now a boolean int, not a counter,
so that we don't have to worry about int overflow.  All uses changed.

src/touch.c

index 21b29e50b77ab47d5ad8f17719a9d36d5b2d137e..728f62c3fd07c6ce01145c1e5cc63d0b72e803df 100644 (file)
@@ -240,7 +240,7 @@ touch (const char *file)
 void
 usage (int status)
 {
-  if (status != 0)
+  if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
             program_name);
   else
@@ -433,7 +433,7 @@ main (int argc, char **argv)
     }
 
   for (; optind < argc; ++optind)
-    err += touch (argv[optind]);
+    err |= touch (argv[optind]);
 
-  exit (err != 0);
+  exit (err == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
 }