summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-08-29 20:47:17 +0000
committerJim Meyering <jim@meyering.net>1999-08-29 20:47:17 +0000
commitde8d09d22d63186e59568bac5048e9f330bd07bd (patch)
tree1e33be185843421008b2d3d8261b20848316ad7b /src
parentb266f1a207f2f256f835e1fe1424f74b8138cf34 (diff)
downloadcoreutils-de8d09d22d63186e59568bac5048e9f330bd07bd.tar.xz
(main): Call exit explicitly to avoid warning from gcc.
Diffstat (limited to 'src')
-rw-r--r--src/nice.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nice.c b/src/nice.c
index 0a9209781..55273f936 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -63,7 +63,7 @@ usage (int status)
program_name);
else
{
- printf (_("Usage: %s [OPTION]... [COMMAND [ARG]...]\n"), program_name);
+ printf (_("Usage: %s [OPTION] [COMMAND [ARG]...]\n"), program_name);
printf (_("\
Run COMMAND with an adjusted scheduling priority.\n\
With no COMMAND, print the current scheduling priority. ADJUST is 10\n\
@@ -192,7 +192,12 @@ main (int argc, char **argv)
error (1, errno, _("cannot set priority"));
execvp (argv[i], &argv[i]);
- error (errno == ENOENT ? 127 : 126, errno, "%s", argv[i]);
+
+ {
+ int exit_status = (errno == ENOENT ? 127 : 126);
+ error (0, errno, "%s", argv[i]);
+ exit (exit_status);
+ }
}
/* Return nonzero if S represents a (possibly signed) decimal integer,