diff options
Diffstat (limited to 'lib/libarchive/test/test_read_data_large.c')
-rw-r--r-- | lib/libarchive/test/test_read_data_large.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libarchive/test/test_read_data_large.c b/lib/libarchive/test/test_read_data_large.c index e7dcc21..0361d5e 100644 --- a/lib/libarchive/test/test_read_data_large.c +++ b/lib/libarchive/test/test_read_data_large.c @@ -42,8 +42,8 @@ DEFINE_TEST(test_read_data_large) struct archive_entry *ae; struct archive *a; char tmpfilename[] = "largefile"; - int tmpfile; - int i; + int tmpfilefd; + unsigned int i; size_t used; /* Create a new archive in memory. */ @@ -96,21 +96,21 @@ DEFINE_TEST(test_read_data_large) assertA(0 == archive_read_support_compression_all(a)); assertA(0 == archive_read_open_memory(a, buff1, sizeof(buff1))); assertA(0 == archive_read_next_header(a, &ae)); - tmpfile = open(tmpfilename, O_WRONLY | O_CREAT, 0777); - assert(tmpfile != 0); - assertEqualIntA(a, 0, archive_read_data_into_fd(a, tmpfile)); + tmpfilefd = open(tmpfilename, O_WRONLY | O_CREAT, 0777); + assert(tmpfilefd != 0); + assertEqualIntA(a, 0, archive_read_data_into_fd(a, tmpfilefd)); assert(0 == archive_read_close(a)); #if ARCHIVE_API_VERSION > 1 assert(0 == archive_read_finish(a)); #else archive_read_finish(a); #endif - close(tmpfile); + close(tmpfilefd); - tmpfile = open(tmpfilename, O_RDONLY); - assert(tmpfile != 0); - assertEqualIntA(NULL, sizeof(buff3), read(tmpfile, buff3, sizeof(buff3))); - close(tmpfile); + tmpfilefd = open(tmpfilename, O_RDONLY); + assert(tmpfilefd != 0); + assertEqualIntA(NULL, sizeof(buff3), read(tmpfilefd, buff3, sizeof(buff3))); + close(tmpfilefd); assert(0 == memcmp(buff2, buff3, sizeof(buff3))); unlink(tmpfilename); |