summaryrefslogtreecommitdiff
path: root/libarchive/archive_write_add_filter_program.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2010-03-01 00:36:29 -0500
committerTim Kientzle <kientzle@gmail.com>2010-03-01 00:36:29 -0500
commit42c1f3e1243e684bc003d857450496a274d16a31 (patch)
tree9cb18cff0a6a3f22efa65645d6f6d16f053d308e /libarchive/archive_write_add_filter_program.c
parent061edc88add6320353d46c385829e6e16b0e4e89 (diff)
downloadlibarchive-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_program.c')
-rw-r--r--libarchive/archive_write_add_filter_program.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libarchive/archive_write_add_filter_program.c b/libarchive/archive_write_add_filter_program.c
index 90c5f11d..3dcc9df7 100644
--- a/libarchive/archive_write_add_filter_program.c
+++ b/libarchive/archive_write_add_filter_program.c
@@ -102,8 +102,8 @@ archive_write_add_filter_program(struct archive *_a, const char *cmd)
struct archive_write *a = (struct archive_write *)_a;
struct private_data *data;
static const char *prefix = "Program: ";
- __archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
- ARCHIVE_STATE_NEW, "archive_write_set_compression_program");
+ archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
+ ARCHIVE_STATE_NEW, "archive_write_add_filter_program");
data = calloc(1, sizeof(*data));
if (data == NULL) {
archive_set_error(&a->archive, ENOMEM, "Out of memory");