From: Jim Meyering Date: Wed, 21 Jan 2004 23:21:17 +0000 (+0000) Subject: (usage): Use EXIT_SUCCESS, not 0, for clarity. X-Git-Tag: v5.1.2~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6673927ff076cb11d329b5e546aad4796a68953d;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. (main): Use int, not size_t, to store boolean int. --- diff --git a/src/md5sum.c b/src/md5sum.c index d70ed4c7ca..561f2a5b26 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -1,5 +1,5 @@ /* Compute MD5 or SHA1 checksum of files or strings - Copyright (C) 1995-2003 Free Software Foundation, Inc. + Copyright (C) 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 @@ -116,7 +116,7 @@ static const struct option 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 @@ -156,7 +156,7 @@ text), and name for each FILE.\n"), printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } - exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE); + exit (status); } #define ISWHITE(c) ((c) == ' ' || (c) == '\t') @@ -546,7 +546,7 @@ main (int argc, char **argv) int opt; char **string = NULL; size_t n_strings = 0; - size_t err = 0; + int err = 0; int file_type_specified = 0; #if O_BINARY