]> 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:07:15 +0000 (23:07 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 21 Jan 2004 23:07:15 +0000 (23:07 +0000)
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.

src/fmt.c
src/fold.c
src/head.c

index a931593dcff9117a4559ba364893ade2cf97f73e..f14dc35170d11c8aaa88a080e458dbf57fb3275f 100644 (file)
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -1,5 +1,5 @@
 /* GNU fmt -- simple text formatter.
-   Copyright (C) 1994-2003 Free Software Foundation, Inc.
+   Copyright (C) 1994-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
@@ -263,7 +263,7 @@ static int last_line_length;
 void
 usage (int status)
 {
-  if (status != 0)
+  if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
             program_name);
   else
@@ -296,7 +296,7 @@ With no FILE, or when FILE is -, read standard input.\n"),
             stdout);
       printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
     }
-  exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+  exit (status);
 }
 
 /* Decode options and launch execution.  */
index 6f50f02b6f6b2459b693644fe0b05a477be86390..a36ce6c946abe5306cdb2bdc18c23848527bdde7 100644 (file)
@@ -58,7 +58,7 @@ static struct option const longopts[] =
 void
 usage (int status)
 {
-  if (status != 0)
+  if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
             program_name);
   else
@@ -84,7 +84,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
     }
-  exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+  exit (status);
 }
 
 /* Assuming the current column is COLUMN, return the column that
index ead59aec4879fe62ac891ac4133d2f8019b36cb4..ab6e96032b3223474c1d2051e2738afc2b9c9277 100644 (file)
@@ -1,5 +1,5 @@
 /* head -- output first part of file(s)
-   Copyright (C) 89, 90, 91, 1995-2003 Free Software Foundation, Inc.
+   Copyright (C) 89, 90, 91, 1995-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
@@ -105,7 +105,7 @@ static struct option const long_options[] =
 void
 usage (int status)
 {
-  if (status != 0)
+  if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
             program_name);
   else
@@ -143,7 +143,7 @@ N may have a multiplier suffix: b 512, k 1024, m 1024*1024.\n\
 "), stdout);
       printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
     }
-  exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+  exit (status);
 }
 
 static void