summaryrefslogtreecommitdiff
path: root/src/hostname.c
diff options
context:
space:
mode:
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