From: Jim Meyering Date: Wed, 21 Jan 2004 22:42:46 +0000 (+0000) Subject: (usage): Use EXIT_SUCCESS, not 0, for clarity. X-Git-Tag: v5.1.2~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e044ce73557ce84baca93687e039ea076a890c1c;p=thirdparty%2Fcoreutils.git (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. --- diff --git a/src/cat.c b/src/cat.c index 116ad5404f..76bc49c70e 100644 --- a/src/cat.c +++ b/src/cat.c @@ -1,5 +1,5 @@ /* cat -- concatenate files and print on the standard output. - Copyright (C) 88, 90, 91, 1995-2003 Free Software Foundation, Inc. + Copyright (C) 88, 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 @@ -77,13 +77,13 @@ static char *line_num_end = line_buf + LINE_COUNTER_BUF_LEN - 3; /* Preserves the `cat' function's local `newlines' between invocations. */ static int newlines2 = 0; -/* Count of non-fatal error conditions. */ +/* Nonzero if a non-fatal error has occurred. */ static int exit_status = 0; void usage (int status) { - if (status != 0) + if (status != EXIT_SUCCESS) fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name); else @@ -122,7 +122,7 @@ With no FILE, or when FILE is -, read standard input.\n\ #endif printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } - exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE); + exit (status); } /* Compute the next line number. */