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

This commit is contained in:
christos 2021-01-28 19:46:54 +00:00
parent 68c9d18d03
commit cd642529b3

View File

@ -798,7 +798,9 @@ copy_file_data_block(struct bsdtar *bsdtar, struct archive *a,
progress += bytes_written; progress += bytes_written;
} }
if (r < ARCHIVE_WARN) { 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 (-1);
} }
return (0); return (0);