From: Tim Kientzle Date: Fri, 26 Feb 2010 05:39:42 +0000 (-0500) Subject: Use archive_clear_error() to wipe the error info. X-Git-Tag: v3.0.0a~1177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf9b830148f7103a363e9cd397936ace744de601;p=thirdparty%2Flibarchive.git Use archive_clear_error() to wipe the error info. SVN-Revision: 1995 --- diff --git a/libarchive/archive_read_support_format_cpio.c b/libarchive/archive_read_support_format_cpio.c index d0bc1d10e..04cceba41 100644 --- a/libarchive/archive_read_support_format_cpio.c +++ b/libarchive/archive_read_support_format_cpio.c @@ -308,9 +308,9 @@ archive_read_format_cpio_read_header(struct archive_read *a, /* Compare name to "TRAILER!!!" to test for end-of-archive. */ if (namelength == 11 && strcmp((const char *)h, "TRAILER!!!") == 0) { - /* TODO: Store file location of start of block. */ - archive_set_error(&a->archive, 0, NULL); - return (ARCHIVE_EOF); + /* TODO: Store file location of start of block. */ + archive_clear_error(&a->archive); + return (ARCHIVE_EOF); } /* Detect and record hardlinks to previously-extracted entries. */ diff --git a/libarchive/archive_read_support_format_tar.c b/libarchive/archive_read_support_format_tar.c index 7d45dbd30..c60d04baa 100644 --- a/libarchive/archive_read_support_format_tar.c +++ b/libarchive/archive_read_support_format_tar.c @@ -577,7 +577,7 @@ tar_read_header(struct archive_read *a, struct tar *tar, h = __archive_read_ahead(a, 512, NULL); if (h != NULL) __archive_read_consume(a, 512); - archive_set_error(&a->archive, 0, NULL); + archive_clear_error(&a->archive); if (a->archive.archive_format_name == NULL) { a->archive.archive_format = ARCHIVE_FORMAT_TAR; a->archive.archive_format_name = "tar";