summaryrefslogtreecommitdiff
path: root/src/md5sum.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-02-01 02:00:04 +0000
committerJim Meyering <jim@meyering.net>1997-02-01 02:00:04 +0000
commitc2d2dec516bd776d6acba7637d2e9ee721394604 (patch)
tree9c653ac2059ce12ae9004342e22881af2c68794a /src/md5sum.c
parent1e40423be84cc3e594d7c64c923f39663549dcca (diff)
downloadcoreutils-c2d2dec516bd776d6acba7637d2e9ee721394604.tar.xz
Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call.
Diffstat (limited to 'src/md5sum.c')
-rw-r--r--src/md5sum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/md5sum.c b/src/md5sum.c
index 16f35476e..0410fea4a 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -448,7 +448,6 @@ main (int argc, char **argv)
int opt;
char **string = NULL;
size_t n_strings = 0;
- size_t i;
size_t err = 0;
int file_type_specified = 0;
@@ -463,8 +462,7 @@ main (int argc, char **argv)
parse_long_options (argc, argv, "md5sum", GNU_PACKAGE, VERSION, usage);
- while ((opt = getopt_long (argc, argv, "bctw", long_options, NULL))
- != EOF)
+ while ((opt = getopt_long (argc, argv, "bctw", long_options, NULL)) != -1)
switch (opt)
{
case 0: /* long option */
@@ -532,6 +530,8 @@ verifying checksums"));
if (n_strings > 0)
{
+ size_t i;
+
if (optind < argc)
{
error (0, 0, _("no files may be specified when using --string"));