summaryrefslogtreecommitdiff
path: root/libarchive/archive_virtual.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2016-05-11 10:19:44 +0000
committerMartin Matuska <mm@FreeBSD.org>2016-05-11 10:19:44 +0000
commit4e579f6c9425c995106fbf72667f4ec7e5d5db85 (patch)
treed298bb9fa3cf4f58e328e696a77fadf758a534eb /libarchive/archive_virtual.c
parent8c8f03ca5b7f1f0d07c23e7c354a45b7c95335f0 (diff)
downloadsrc-test2-4e579f6c9425c995106fbf72667f4ec7e5d5db85.tar.gz
src-test2-4e579f6c9425c995106fbf72667f4ec7e5d5db85.zip
Notes
Diffstat (limited to 'libarchive/archive_virtual.c')
-rw-r--r--libarchive/archive_virtual.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libarchive/archive_virtual.c b/libarchive/archive_virtual.c
index 0c4155f21e3b..de2595a9ead5 100644
--- a/libarchive/archive_virtual.c
+++ b/libarchive/archive_virtual.c
@@ -55,6 +55,14 @@ archive_filter_bytes(struct archive *a, int n)
}
int
+archive_free(struct archive *a)
+{
+ if (a == NULL)
+ return (ARCHIVE_OK);
+ return ((a->vtable->archive_free)(a));
+}
+
+int
archive_write_close(struct archive *a)
{
return ((a->vtable->archive_close)(a));
@@ -76,9 +84,7 @@ archive_write_fail(struct archive *a)
int
archive_write_free(struct archive *a)
{
- if (a == NULL)
- return (ARCHIVE_OK);
- return ((a->vtable->archive_free)(a));
+ return archive_free(a);
}
#if ARCHIVE_VERSION_NUMBER < 4000000
@@ -93,9 +99,7 @@ archive_write_finish(struct archive *a)
int
archive_read_free(struct archive *a)
{
- if (a == NULL)
- return (ARCHIVE_OK);
- return ((a->vtable->archive_free)(a));
+ return archive_free(a);
}
#if ARCHIVE_VERSION_NUMBER < 4000000