diff options
author | Jim Meyering <jim@meyering.net> | 2004-01-22 21:07:40 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-01-22 21:07:40 +0000 |
commit | 5dd70584396397f184df27f6adabee9abd900131 (patch) | |
tree | db89b4bd8045349f3c3e086bb842b2d052eb4781 /src | |
parent | b8d43c94371a1ff0834b6103e35dad05688d7cce (diff) | |
download | coreutils-5dd70584396397f184df27f6adabee9abd900131.tar.xz |
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
(FATAL_ERROR, main): Exit with status EXIT_FAILURE, not 2, on errors.
Diffstat (limited to 'src')
-rw-r--r-- | src/tr.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ /* tr -- a filter to translate characters - Copyright (C) 91, 1995-2003 Free Software Foundation, Inc. + Copyright (C) 91, 1995-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -312,7 +312,7 @@ static struct option const long_options[] = void usage (int status) { - if (status != 0) + if (status != EXIT_SUCCESS) fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name); else @@ -388,7 +388,7 @@ translation or deletion.\n\ "), stdout); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } - exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE); + exit (status); } /* Return nonzero if the character C is a member of the @@ -1822,7 +1822,7 @@ main (int argc, char **argv) case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); default: - usage (2); + usage (EXIT_FAILURE); break; } } @@ -1840,7 +1840,7 @@ main (int argc, char **argv) if (non_option_args > 2) { error (0, 0, _("too many arguments")); - usage (2); + usage (EXIT_FAILURE); } if (!delete && !squeeze_repeats && non_option_args != 2) |