From: Jim Meyering Date: Wed, 21 Jan 2004 23:09:07 +0000 (+0000) Subject: (usage): Use EXIT_SUCCESS, not 0, for clarity. X-Git-Tag: v5.1.2~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d502554630cbb2555134909848158031c589ae1;p=thirdparty%2Fcoreutils.git (usage): Use EXIT_SUCCESS, not 0, for clarity. (main): Exit with status 1, not 2, on errors detected by hostname proper. --- diff --git a/src/hostname.c b/src/hostname.c index 52c1892f44..9fcb897c75 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); }