]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Change error message from "fwrite function failed" to "write function failed" 2677/head
authorRose <gfunni234@gmail.com>
Thu, 19 Jun 2025 16:00:23 +0000 (12:00 -0400)
committerRose <gfunni234@gmail.com>
Thu, 19 Jun 2025 18:44:43 +0000 (14:44 -0400)
We are checking the return value from write, not fwrite, so this message is wrong.

libarchive/archive_write_set_format_7zip.c
libarchive/archive_write_set_format_xar.c

index 902d03f6a8faa1c8932e0240641ee2177a9506fd..ebdb16e9022ae172d56e6402d7d367bc06626f15 100644 (file)
@@ -686,7 +686,7 @@ write_to_temp(struct archive_write *a, const void *buff, size_t s)
                ws = write(zip->temp_fd, p, s);
                if (ws < 0) {
                        archive_set_error(&(a->archive), errno,
-                           "fwrite function failed");
+                           "write function failed");
                        return (ARCHIVE_FATAL);
                }
                s -= ws;
index 3775e9f5819a77583768d20058b98dbfb8249dee..bb2ba97e4bc333e5f53ccb773e6b50c594951d68 100644 (file)
@@ -689,7 +689,7 @@ write_to_temp(struct archive_write *a, const void *buff, size_t s)
                ws = write(xar->temp_fd, p, s);
                if (ws < 0) {
                        archive_set_error(&(a->archive), errno,
-                           "fwrite function failed");
+                           "write function failed");
                        return (ARCHIVE_FATAL);
                }
                s -= ws;