From: Tim Kientzle Date: Mon, 23 Jan 2012 05:06:04 +0000 (-0500) Subject: Rename read_open_memory2 to read_open_memory_minimal, which is X-Git-Tag: v3.0.4~2^2~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f230c6c30a4e9bc93454f4a5b4b4cf0e3597c31;p=thirdparty%2Flibarchive.git Rename read_open_memory2 to read_open_memory_minimal, which is a bit more descriptive. SVN-Revision: 4192 --- diff --git a/libarchive/test/read_open_memory.c b/libarchive/test/read_open_memory.c index d7e203b20..0bf6f754f 100644 --- a/libarchive/test/read_open_memory.c +++ b/libarchive/test/read_open_memory.c @@ -68,7 +68,7 @@ read_open_memory(struct archive *a, void *buff, size_t size, size_t read_size) * that internals work correctly with just the minimal entry points. */ int -read_open_memory2(struct archive *a, void *buff, size_t size, size_t read_size) +read_open_memory_minimal(struct archive *a, void *buff, size_t size, size_t read_size) { return read_open_memory_internal(a, buff, size, read_size, 1); } diff --git a/libarchive/test/test.h b/libarchive/test/test.h index e45919421..e464612d5 100644 --- a/libarchive/test/test.h +++ b/libarchive/test/test.h @@ -295,8 +295,8 @@ const char *testworkdir; /* Special customized read-from-memory interface. */ int read_open_memory(struct archive *, void *, size_t, size_t); -/* "2" version exercises a slightly different set of libarchive APIs. */ -int read_open_memory2(struct archive *, void *, size_t, size_t); +/* _minimal version exercises a slightly different set of libarchive APIs. */ +int read_open_memory_minimal(struct archive *, void *, size_t, size_t); /* _seek version produces a seekable file. */ int read_open_memory_seek(struct archive *, void *, size_t, size_t); diff --git a/libarchive/test/test_compat_zip.c b/libarchive/test/test_compat_zip.c index bd22c834c..8f457e699 100644 --- a/libarchive/test/test_compat_zip.c +++ b/libarchive/test/test_compat_zip.c @@ -408,14 +408,13 @@ test_compat_zip_7(void) struct archive_entry *ae; void *p; size_t s; - int i; extract_reference_file(refname); p = slurpfile(&s, refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, read_open_memory2(a, p, s, 16)); + assertEqualIntA(a, ARCHIVE_OK, read_open_memory_minimal(a, p, s, 16)); assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); diff --git a/libarchive/test/test_read_pax_truncated.c b/libarchive/test/test_read_pax_truncated.c index 7350c58a1..7c1ba6c1e 100644 --- a/libarchive/test/test_read_pax_truncated.c +++ b/libarchive/test/test_read_pax_truncated.c @@ -71,10 +71,10 @@ DEFINE_TEST(test_read_pax_truncated) assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); /* If it's truncated very early, the file type detection should fail. */ if (i < 512) { - assertEqualIntA(a, ARCHIVE_FATAL, read_open_memory2(a, buff, i, 13)); + assertEqualIntA(a, ARCHIVE_FATAL, read_open_memory_minimal(a, buff, i, 13)); goto wrap_up; } else { - assertEqualIntA(a, ARCHIVE_OK, read_open_memory2(a, buff, i, 13)); + assertEqualIntA(a, ARCHIVE_OK, read_open_memory_minimal(a, buff, i, 13)); } /* If it's truncated in a header, the header read should fail. */ diff --git a/libarchive/test/test_read_position.c b/libarchive/test/test_read_position.c index 80838b5a3..00f71b197 100644 --- a/libarchive/test/test_read_position.c +++ b/libarchive/test/test_read_position.c @@ -103,7 +103,7 @@ DEFINE_TEST(test_read_position) /* Read the archive back without a skip function. */ assert(NULL != (a = archive_read_new())); assertA(0 == archive_read_support_format_tar(a)); - assertA(0 == read_open_memory2(a, buff, sizeof(buff), 512)); + assertA(0 == read_open_memory_minimal(a, buff, sizeof(buff), 512)); verify_read_positions(a); archive_read_free(a);