diff options
author | Martin Matuska <martin@matuska.de> | 2022-12-08 16:26:37 +0100 |
---|---|---|
committer | Martin Matuska <martin@matuska.de> | 2022-12-08 16:26:37 +0100 |
commit | 0eac3985f068dfda69840264090a5b0f26def3fd (patch) | |
tree | b556a3bb558ca6b16b2a7bd222f74f832eb92f30 | |
parent | 31d08b500901bce86420047eaca50857314ec0e5 (diff) | |
download | libarchive-0eac3985f068dfda69840264090a5b0f26def3fd.tar.gz |
test_main.c: omit always-true comparsion
Reported by: CodeQL
Code Scanning Alert: 127
-rw-r--r-- | test_utils/test_main.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test_utils/test_main.c b/test_utils/test_main.c index f5f5a713..74250ad7 100644 --- a/test_utils/test_main.c +++ b/test_utils/test_main.c @@ -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; |