summaryrefslogtreecommitdiff
path: root/src/hostname.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-01-21 23:09:07 +0000
committerJim Meyering <jim@meyering.net>2004-01-21 23:09:07 +0000
commit1d502554630cbb2555134909848158031c589ae1 (patch)
tree79c2fdc6b576fddd237790fcacc3dfa6d96a6b47 /src/hostname.c
parent3a34661eb0d0ad9be3cb2a79006199a412049f6d (diff)
downloadcoreutils-1d502554630cbb2555134909848158031c589ae1.tar.xz
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Exit with status 1, not 2, on errors detected by hostname proper.
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 52c1892f4..9fcb897c7 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -1,5 +1,5 @@
/* hostname - set or print the name of current host system
- Copyright (C) 1994-1997, 1999-2003 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997, 1999-2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ char *program_name;
void
usage (int status)
{
- if (status != 0)
+ if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
@@ -119,7 +119,7 @@ main (int argc, char **argv)
}
else
{
- error (2, 0, _("too many arguments"));
+ error (0, 0, _("too many arguments"));
usage (EXIT_FAILURE);
}