svn commit: trunk/busybox/archival

vda at busybox.net vda at busybox.net
Fri Oct 17 14:11:04 UTC 2008


Author: vda
Date: 2008-10-17 07:11:04 -0700 (Fri, 17 Oct 2008)
New Revision: 23706

Log:
cpio: fix regression in prev commit (harmless)



Modified:
   trunk/busybox/archival/cpio.c


Changeset:
Modified: trunk/busybox/archival/cpio.c
===================================================================
--- trunk/busybox/archival/cpio.c	2008-10-17 14:05:53 UTC (rev 23705)
+++ trunk/busybox/archival/cpio.c	2008-10-17 14:11:04 UTC (rev 23706)
@@ -341,11 +341,13 @@
 		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;
 }




More information about the busybox-cvs mailing list