Skip to content

Commit

Permalink
Check for ARCHIVE_FATAL should be in the while loop
Browse files Browse the repository at this point in the history
It is impossible for if (r == ARCHIVE_FATAL) to be true otherwise, and it makes sense to check every time for a fatal error.
  • Loading branch information
AtariDreams committed Jul 21, 2023
1 parent bd074c2 commit 74739ab
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion contrib/archivetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ int main(int argc, char *argv[])
v_print(v, "skipping");
} else {
while ((r = archive_read_data(a, buffer, 4096) > 0))
;
if (r == ARCHIVE_FATAL) {
v_print(v, "ERROR\nError string: %s\n",
archive_error_string(a));
Expand Down

0 comments on commit 74739ab

Please sign in to comment.