summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_virtual.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-03 18:37:54 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-03 19:02:49 (GMT)
commit2f1978632b709a9370b3cb1137375c05351d149c (patch)
tree85980710818211b8188709643e6714e8839feee9 /Utilities/cmlibarchive/libarchive/archive_virtual.c
parent23e4666cf57c31c719472debba83a43f54d351d8 (diff)
parent64713ae3ffddf6fbbfa7ea762c3d756cb245a066 (diff)
downloadCMake-2f1978632b709a9370b3cb1137375c05351d149c.zip
CMake-2f1978632b709a9370b3cb1137375c05351d149c.tar.gz
CMake-2f1978632b709a9370b3cb1137375c05351d149c.tar.bz2
Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts in favor of the upstream side where possible. Resolve a logical conflict in archive_windows.h where the upstream port to Watcom was done slightly differently from ours.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_virtual.c')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_virtual.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_virtual.c b/Utilities/cmlibarchive/libarchive/archive_virtual.c
index 0c4155f..de2595a 100644
--- a/Utilities/cmlibarchive/libarchive/archive_virtual.c
+++ b/Utilities/cmlibarchive/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