From a9f7720ec980316e700e185d0f1059ba3457f0a8 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 21 Jan 2004 23:07:15 +0000 Subject: [PATCH] (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. --- src/fmt.c | 6 +++--- src/fold.c | 4 ++-- src/head.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/fmt.c b/src/fmt.c index a931593dcf..f14dc35170 100644 --- 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. */ diff --git a/src/fold.c b/src/fold.c index 6f50f02b6f..a36ce6c946 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 ead59aec48..ab6e96032b 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 -- 2.47.2