]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
test_main.c: omit always-true comparsion
authorMartin Matuska <martin@matuska.de>
Thu, 8 Dec 2022 15:26:37 +0000 (16:26 +0100)
committerMartin Matuska <martin@matuska.de>
Thu, 8 Dec 2022 15:26:37 +0000 (16:26 +0100)
Reported by: CodeQL
Code Scanning Alert: 127

test_utils/test_main.c

index f5f5a713be3c97e5ef71a117c03cba4845b3a9ab..74250ad748c2d7fc046d525b3980ae752900534f 100644 (file)
@@ -3190,14 +3190,12 @@ extract_reference_file(const char *name)
                while (bytes > 0) {
                        int n = 0;
                        /* Write out 1-3 bytes from that. */
-                       if (bytes > 0) {
-                               assert(VALID_UUDECODE(p[0]));
-                               assert(VALID_UUDECODE(p[1]));
-                               n = UUDECODE(*p++) << 18;
-                               n |= UUDECODE(*p++) << 12;
-                               fputc(n >> 16, out);
-                               --bytes;
-                       }
+                       assert(VALID_UUDECODE(p[0]));
+                       assert(VALID_UUDECODE(p[1]));
+                       n = UUDECODE(*p++) << 18;
+                       n |= UUDECODE(*p++) << 12;
+                       fputc(n >> 16, out);
+                       --bytes;
                        if (bytes > 0) {
                                assert(VALID_UUDECODE(p[0]));
                                n |= UUDECODE(*p++) << 6;