aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-10-17 14:11:04 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-10-17 14:11:04 +0000
commitcf4dd07b28fc590f12543d68dacfcb80616223dc (patch)
tree233c1c27bed8c1acd27302384163335b2b02a921 /archival
parentd83676ec47fa359bad9ed949919edc68f84a4ef2 (diff)
downloadbusybox-cf4dd07b28fc590f12543d68dacfcb80616223dc.tar.gz
cpio: fix regression in prev commit (harmless)
Diffstat (limited to 'archival')
-rw-r--r--archival/cpio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/archival/cpio.c b/archival/cpio.c
index d39640d24..b447b27e4 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -341,11 +341,13 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
argv++;
}
+ /* see get_header_cpio */
+ archive_handle->ah_priv[2] = (void*) ~(ptrdiff_t)0;
while (get_header_cpio(archive_handle) == EXIT_SUCCESS)
continue;
- /* see get_header_cpio */
- printf("%lu blocks\n", (unsigned long)(ptrdiff_t)(archive_handle->ah_priv[2]));
+ if (archive_handle->ah_priv[2] != (void*) ~(ptrdiff_t)0)
+ printf("%lu blocks\n", (unsigned long)(ptrdiff_t)(archive_handle->ah_priv[2]));
return EXIT_SUCCESS;
}