summaryrefslogtreecommitdiff
path: root/src/hostname.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/hostname.c
parent6c80ecd8d5d3a0642f8cf321f9750f50314ea939 (diff)
downloadcoreutils-74887031996e79df07dae9711f08d80839b31e62.tar.xz
Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
Diffstat (limited to 'src/hostname.c')
-rw-r--r--src/hostname.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hostname.c b/src/hostname.c
index fe4aeb682..c004523ca 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -101,12 +101,12 @@ main (int argc, char **argv)
/* Set hostname to argv[1]. */
err = sethostname (argv[1], strlen (argv[1]));
if (err != 0)
- error (1, errno, _("cannot set hostname to `%s'"), argv[1]);
+ error (EXIT_FAILURE, errno, _("cannot set hostname to `%s'"), argv[1]);
exit (0);
}
#else
if (argc == 2)
- error (1, 0,
+ error (EXIT_FAILURE, 0,
_("cannot set hostname; this system lacks the functionality"));
#endif
@@ -114,7 +114,7 @@ main (int argc, char **argv)
{
hostname = xgethostname ();
if (hostname == NULL)
- error (1, errno, _("cannot determine hostname"));
+ error (EXIT_FAILURE, errno, _("cannot determine hostname"));
printf ("%s\n", hostname);
}
else