From: AtariDreams <83477269+AtariDreams@users.noreply.github.com> Date: Sun, 23 Jul 2023 22:10:10 +0000 (-0400) Subject: Correct assignment to r when checking for result of reading archive data (#1929) X-Git-Tag: v3.7.1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14961578909803323ac6b785f3f6e75f0a580555;p=thirdparty%2Flibarchive.git Correct assignment to r when checking for result of reading archive data (#1929) It is impossible for if (r == ARCHIVE_FATAL) to be true otherwise. --- diff --git a/contrib/archivetest.c b/contrib/archivetest.c index e4a25e3c9..a298f5654 100644 --- a/contrib/archivetest.c +++ b/contrib/archivetest.c @@ -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",