mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(err): Now a boolean int, not a counter, so that we don't have to worry about int overflow. All uses changed.
This commit is contained in:
1 parent
ae3cdb71e9
commit
b8d43c9437
1 file changed
+3
-3
+3
-3
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user