]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
digest.c: remove a duplicate variable
authorJim Meyering <meyering@fb.com>
Mon, 30 Jan 2023 16:33:10 +0000 (08:33 -0800)
committerJim Meyering <meyering@meta.com>
Mon, 30 Jan 2023 17:26:09 +0000 (09:26 -0800)
* src/digest.c (digest_check): Locals n_misformatted_lines and
n_improperly_formatted_lines were declared and set/incremented
identically. Remove declaration of the latter. Use the other instead.

src/digest.c

index 20c9940bff9835570daee83772e3671f0a36e864..8f9354b6ac96664582208ca794e935a6284b08d5 100644 (file)
@@ -1026,7 +1026,6 @@ digest_check (char const *checkfile_name)
 {
   FILE *checkfile_stream;
   uintmax_t n_misformatted_lines = 0;
-  uintmax_t n_improperly_formatted_lines = 0;
   uintmax_t n_mismatched_checksums = 0;
   uintmax_t n_open_or_read_failures = 0;
   bool properly_formatted_lines = false;
@@ -1102,8 +1101,6 @@ digest_check (char const *checkfile_name)
                      quotef (checkfile_name), line_number,
                      DIGEST_TYPE_STRING);
             }
-
-          ++n_improperly_formatted_lines;
         }
       else
         {
@@ -1236,7 +1233,7 @@ digest_check (char const *checkfile_name)
           && matched_checksums
           && n_mismatched_checksums == 0
           && n_open_or_read_failures == 0
-          && (!strict || n_improperly_formatted_lines == 0));
+          && (!strict || n_misformatted_lines == 0));
 }
 
 int