]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(usage): Use EXIT_SUCCESS, not 0, for clarity.
authorJim Meyering <jim@meyering.net>
Wed, 21 Jan 2004 23:09:07 +0000 (23:09 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 21 Jan 2004 23:09:07 +0000 (23:09 +0000)
(main): Exit with status 1, not 2, on errors detected
by hostname proper.

src/hostname.c

index 52c1892f44be5ee913bf5b5fb6a87cab63b46b6f..9fcb897c75987a93b604ea2df85f88a80e5724d5 100644 (file)
@@ -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);
     }