]> 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:21:17 +0000 (23:21 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 21 Jan 2004 23:21:17 +0000 (23:21 +0000)
(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.

src/md5sum.c

index d70ed4c7ca133cfd2340f32ee45fbcb277fe7c43..561f2a5b26e85068fefb94dfef6d4a15305de1fc 100644 (file)
@@ -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