Skip to content

Commit

Permalink
Correct assignment to r when checking for result of reading archive data
Browse files Browse the repository at this point in the history
It is impossible for if (r == ARCHIVE_FATAL) to be true otherwise.
  • Loading branch information
AtariDreams committed Jul 22, 2023
1 parent ad5e836 commit 851772d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/archivetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ int main(int argc, char *argv[])
if (skip_data) {
v_print(v, "skipping");
} else {
while ((r = archive_read_data(a, buffer, 4096) > 0))
while ((r = archive_read_data(a, buffer, 4096)) > 0)
;
if (r == ARCHIVE_FATAL) {
v_print(v, "ERROR\nError string: %s\n",
Expand Down

0 comments on commit 851772d

Please sign in to comment.