summaryrefslogtreecommitdiff
path: root/archival/cpio.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-01-06 10:53:17 +0100
committerDenys Vlasenko2010-01-06 10:53:17 +0100
commitaa4977d8e549d9fff2b2946f03d304e435eb20f1 (patch)
treebc7c7fe4ab64263a9f8356762cb8f7e77165de73 /archival/cpio.c
parent86350f8d5f5d5a1006cffe0bedccd625f012702f (diff)
downloadbusybox-aa4977d8e549d9fff2b2946f03d304e435eb20f1.zip
busybox-aa4977d8e549d9fff2b2946f03d304e435eb20f1.tar.gz
libunarchive: clean up dirty hacks. code shrank as a result
function old new delta cpio_main 526 539 +13 init_handle 57 58 +1 init_archive_deb_ar 34 35 +1 get_header_ar 408 409 +1 dpkg_main 3900 3901 +1 unpack_package 516 515 -1 rpm_main 1673 1672 -1 tar_main 774 767 -7 get_header_cpio 990 972 -18 data_extract_all 750 727 -23 get_header_tar 1631 1576 -55 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/6 up/down: 17/-105) Total: -88 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/cpio.c')
-rw-r--r--archival/cpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/archival/cpio.c b/archival/cpio.c
index 067d6e8..b21ba6e 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -412,14 +412,14 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
}
/* see get_header_cpio */
- archive_handle->ah_priv[2] = (void*) ~(ptrdiff_t)0;
+ archive_handle->cpio__blocks = (off_t)-1;
while (get_header_cpio(archive_handle) == EXIT_SUCCESS)
continue;
- if (archive_handle->ah_priv[2] != (void*) ~(ptrdiff_t)0
+ if (archive_handle->cpio__blocks != (off_t)-1
&& !(opt & CPIO_OPT_QUIET)
)
- printf("%lu blocks\n", (unsigned long)(ptrdiff_t)(archive_handle->ah_priv[2]));
+ printf("%"OFF_FMT"u blocks\n", archive_handle->cpio__blocks);
return EXIT_SUCCESS;
}