diff options
author | Tim Kientzle <kientzle@gmail.com> | 2010-03-01 00:36:29 -0500 |
---|---|---|
committer | Tim Kientzle <kientzle@gmail.com> | 2010-03-01 00:36:29 -0500 |
commit | 42c1f3e1243e684bc003d857450496a274d16a31 (patch) | |
tree | 9cb18cff0a6a3f22efa65645d6f6d16f053d308e /libarchive/archive_write_add_filter_compress.c | |
parent | 061edc88add6320353d46c385829e6e16b0e4e89 (diff) | |
download | libarchive-42c1f3e1243e684bc003d857450496a274d16a31.tar.gz |
Open a door to changing the current abort-on-state-failure behavior:
* Change __archive_check_magic to return a status code.
* Change callers to use the archive_check_magic() wrapper macro,
which calls __archive_check_magic and returns immediately
if there's an ARCHIVE_FATAL status.
* Update a bunch of API calls to actually do magic state checks.
I've also changed __archive_check_magic around a little bit:
* Magic number checks still call abort().
* State failures still call abort()
* Starting with libarchive 3.0, state failures will return ARCHIVE_FATAL.
SVN-Revision: 2003
Diffstat (limited to 'libarchive/archive_write_add_filter_compress.c')
-rw-r--r-- | libarchive/archive_write_add_filter_compress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libarchive/archive_write_add_filter_compress.c b/libarchive/archive_write_add_filter_compress.c index 7e3ef6bb..0ae98ea5 100644 --- a/libarchive/archive_write_add_filter_compress.c +++ b/libarchive/archive_write_add_filter_compress.c @@ -132,8 +132,8 @@ archive_write_add_filter_compress(struct archive *_a) struct archive_write *a = (struct archive_write *)_a; struct archive_write_filter *f = __archive_write_allocate_filter(_a); - __archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, - ARCHIVE_STATE_NEW, "archive_write_set_compression_compress"); + archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, + ARCHIVE_STATE_NEW, "archive_write_add_filter_compress"); f->open = &archive_compressor_compress_open; f->code = ARCHIVE_COMPRESSION_COMPRESS; f->name = "compress"; |