Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/libarchive/dist/tar Don't try print an error me...



details:   https://anonhg.NetBSD.org/src/rev/eca39c30ef3d
branches:  trunk
changeset: 959010:eca39c30ef3d
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 28 19:46:54 2021 +0000

description:
Don't try print an error message when there is none.

diffstat:

 external/bsd/libarchive/dist/tar/write.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 97975e48fd31 -r eca39c30ef3d external/bsd/libarchive/dist/tar/write.c
--- a/external/bsd/libarchive/dist/tar/write.c  Thu Jan 28 19:42:27 2021 +0000
+++ b/external/bsd/libarchive/dist/tar/write.c  Thu Jan 28 19:46:54 2021 +0000
@@ -798,7 +798,9 @@
                progress += bytes_written;
        }
        if (r < ARCHIVE_WARN) {
-               lafe_warnc(archive_errno(a), "%s", archive_error_string(a));
+               const char *s = archive_error_string(a);
+               if (s)
+                       lafe_warnc(archive_errno(a), "%s", s);
                return (-1);
        }
        return (0);



Home | Main Index | Thread Index | Old Index