summaryrefslogtreecommitdiff
path: root/src/nice.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-08-30 23:04:53 +0000
committerJim Meyering <jim@meyering.net>2002-08-30 23:04:53 +0000
commit74887031996e79df07dae9711f08d80839b31e62 (patch)
treed249c7ea293b5540ca108f3b40733401544b29ba /src/nice.c
parent6c80ecd8d5d3a0642f8cf321f9750f50314ea939 (diff)
downloadcoreutils-74887031996e79df07dae9711f08d80839b31e62.tar.xz
Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
Diffstat (limited to 'src/nice.c')
-rw-r--r--src/nice.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nice.c b/src/nice.c
index c7ff18d41..13122d92f 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -106,7 +106,7 @@ main (int argc, char **argv)
&& posix2_version () < 200112)
{
if (xstrtol (&s[2], NULL, 10, &adjustment, "") != LONGINT_OK)
- error (1, 0, _("invalid option `%s'"), s);
+ error (EXIT_FAILURE, 0, _("invalid option `%s'"), s);
minusflag = 1;
adjustment_given = 1;
@@ -119,7 +119,7 @@ main (int argc, char **argv)
if (s[1] == '+')
++s;
if (xstrtol (&s[1], NULL, 10, &adjustment, "") != LONGINT_OK)
- error (1, 0, _("invalid option `%s'"), s);
+ error (EXIT_FAILURE, 0, _("invalid option `%s'"), s);
minusflag = 0;
adjustment_given = 1;
@@ -144,7 +144,7 @@ main (int argc, char **argv)
case 'n':
if (xstrtol (optarg, NULL, 10, &adjustment, "")
!= LONGINT_OK)
- error (1, 0, _("invalid priority `%s'"), optarg);
+ error (EXIT_FAILURE, 0, _("invalid priority `%s'"), optarg);
minusflag = 0;
adjustment_given = 1;
@@ -175,7 +175,7 @@ main (int argc, char **argv)
errno = 0;
current_priority = GET_PRIORITY ();
if (current_priority == -1 && errno != 0)
- error (1, errno, _("cannot get priority"));
+ error (EXIT_FAILURE, errno, _("cannot get priority"));
printf ("%d\n", current_priority);
exit (0);
}
@@ -184,12 +184,12 @@ main (int argc, char **argv)
errno = 0;
current_priority = GET_PRIORITY ();
if (current_priority == -1 && errno != 0)
- error (1, errno, _("cannot get priority"));
+ error (EXIT_FAILURE, errno, _("cannot get priority"));
if (setpriority (PRIO_PROCESS, 0, current_priority + adjustment))
#else
if (nice (adjustment) == -1)
#endif
- error (1, errno, _("cannot set priority"));
+ error (EXIT_FAILURE, errno, _("cannot set priority"));
execvp (argv[i], &argv[i]);