diff options
author | Jim Meyering <jim@meyering.net> | 2004-01-21 23:07:15 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-01-21 23:07:15 +0000 |
commit | a9f7720ec980316e700e185d0f1059ba3457f0a8 (patch) | |
tree | 333f2fd862aa66d203e75f4f64803059c1bc426e /src | |
parent | a86c7314d8d8f60210cafc16cf8fbbe7794f6008 (diff) | |
download | coreutils-a9f7720ec980316e700e185d0f1059ba3457f0a8.tar.xz |
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
Diffstat (limited to 'src')
-rw-r--r-- | src/fmt.c | 6 | ||||
-rw-r--r-- | src/fold.c | 4 | ||||
-rw-r--r-- | src/head.c | 6 |
3 files changed, 8 insertions, 8 deletions
@@ -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. */ diff --git a/src/fold.c b/src/fold.c index 6f50f02b6..a36ce6c94 100644 --- a/src/fold.c +++ b/src/fold.c @@ -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 diff --git a/src/head.c b/src/head.c index ead59aec4..ab6e96032 100644 --- a/src/head.c +++ b/src/head.c @@ -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 |