]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
libarchive: Remove "Failed : " error prefixes
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 17 Mar 2026 09:46:25 +0000 (10:46 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 17 Mar 2026 09:46:25 +0000 (10:46 +0100)
Calling archive_set_error with a message and errno already indicates
that a failure occurred. Only a minority of functions did that: Unify
with the rest.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_read_disk_posix.c
libarchive/archive_read_disk_windows.c

index 94fa8fef963ff5e91ff1ebb2c86afd9c77bdc503..a7176bdd939dd6de710828ba5213e8f5efdfd814 100644 (file)
@@ -921,7 +921,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
                r = archive_match_path_excluded(a->matching, entry);
                if (r < 0) {
                        archive_set_error(&(a->archive), errno,
-                           "Failed : %s", archive_error_string(a->matching));
+                           "%s", archive_error_string(a->matching));
                        return (r);
                }
                if (r) {
@@ -1035,7 +1035,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
                r = archive_match_time_excluded(a->matching, entry);
                if (r < 0) {
                        archive_set_error(&(a->archive), errno,
-                           "Failed : %s", archive_error_string(a->matching));
+                           "%s", archive_error_string(a->matching));
                        return (r);
                }
                if (r) {
@@ -1061,7 +1061,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
                r = archive_match_owner_excluded(a->matching, entry);
                if (r < 0) {
                        archive_set_error(&(a->archive), errno,
-                           "Failed : %s", archive_error_string(a->matching));
+                           "%s", archive_error_string(a->matching));
                        return (r);
                }
                if (r) {
index 117ca505fadd04922fa141eb28cb6018af4d8693..0e890497a443d962435318edf1a4f6eab27ccda2 100644 (file)
@@ -947,7 +947,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
                r = archive_match_path_excluded(a->matching, entry);
                if (r < 0) {
                        archive_set_error(&(a->archive), errno,
-                           "Failed : %s", archive_error_string(a->matching));
+                           "%s", archive_error_string(a->matching));
                        return (r);
                }
                if (r) {
@@ -1019,7 +1019,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
                r = archive_match_time_excluded(a->matching, entry);
                if (r < 0) {
                        archive_set_error(&(a->archive), errno,
-                           "Failed : %s", archive_error_string(a->matching));
+                           "%s", archive_error_string(a->matching));
                        return (r);
                }
                if (r) {
@@ -1045,7 +1045,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
                r = archive_match_owner_excluded(a->matching, entry);
                if (r < 0) {
                        archive_set_error(&(a->archive), errno,
-                           "Failed : %s", archive_error_string(a->matching));
+                           "%s", archive_error_string(a->matching));
                        return (r);
                }
                if (r) {