diff options
author | Jim Meyering <jim@meyering.net> | 2007-08-29 00:13:16 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-08-29 00:14:23 +0200 |
commit | 35755454e45a6cbab4c711353131df483d89a979 (patch) | |
tree | d2bb8299b0d0678fadb121db71f8278eea680e82 /src/nice.c | |
parent | adfc479d47cb0323b4dd4fa93ed9a5df6a93b7b8 (diff) | |
download | coreutils-35755454e45a6cbab4c711353131df483d89a979.tar.xz |
Use EXIT_FAILURE, not EXIT_FAIL, now that EXIT_FAILURE is always 1.
* src/system.h (EXIT_FAIL): Remove definition.
* src/chroot.c (main): EXIT_FAIL -> EXIT_FAILURE.
* src/env.c (main): Likewise.
* src/nice.c (main): Likewise.
* src/su.c (change_identity, main): Likewise.
* src/tty.c (main): Likewise.
Suggestion from Eric Blake.
Diffstat (limited to 'src/nice.c')
-rw-r--r-- | src/nice.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nice.c b/src/nice.c index 4624e48bb..7892fea4c 100644 --- a/src/nice.c +++ b/src/nice.c @@ -104,7 +104,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - initialize_exit_failure (EXIT_FAIL); + initialize_exit_failure (EXIT_FAILURE); atexit (close_stdout); parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, @@ -135,7 +135,7 @@ main (int argc, char **argv) i += optind - 1; if (optc == '?') - usage (EXIT_FAIL); + usage (EXIT_FAILURE); else if (optc == 'n') adjustment_given = optarg; else /* optc == -1 */ @@ -151,7 +151,7 @@ main (int argc, char **argv) enum { MIN_ADJUSTMENT = 1 - 2 * NZERO, MAX_ADJUSTMENT = 2 * NZERO - 1 }; long int tmp; if (LONGINT_OVERFLOW < xstrtol (adjustment_given, NULL, 10, &tmp, "")) - error (EXIT_FAIL, 0, _("invalid adjustment %s"), + error (EXIT_FAILURE, 0, _("invalid adjustment %s"), quote (adjustment_given)); adjustment = MAX (MIN_ADJUSTMENT, MIN (tmp, MAX_ADJUSTMENT)); } @@ -161,13 +161,13 @@ main (int argc, char **argv) if (adjustment_given) { error (0, 0, _("a command must be given with an adjustment")); - usage (EXIT_FAIL); + usage (EXIT_FAILURE); } /* No command given; print the niceness. */ errno = 0; current_niceness = GET_NICENESS (); if (current_niceness == -1 && errno != 0) - error (EXIT_FAIL, errno, _("cannot get niceness")); + error (EXIT_FAILURE, errno, _("cannot get niceness")); printf ("%d\n", current_niceness); exit (EXIT_SUCCESS); } @@ -178,11 +178,11 @@ main (int argc, char **argv) #else current_niceness = GET_NICENESS (); if (current_niceness == -1 && errno != 0) - error (EXIT_FAIL, errno, _("cannot get niceness")); + error (EXIT_FAILURE, errno, _("cannot get niceness")); ok = (setpriority (PRIO_PROCESS, 0, current_niceness + adjustment) == 0); #endif if (!ok) - error (errno == EPERM ? 0 : EXIT_FAIL, errno, _("cannot set niceness")); + error (errno == EPERM ? 0 : EXIT_FAILURE, errno, _("cannot set niceness")); execvp (argv[i], &argv[i]); |