[git commit] bzip2: convert some locals to unsigned's

Denys Vlasenko vda.linux at googlemail.com
Sat Feb 3 17:03:33 UTC 2018


commit: https://git.busybox.net/busybox/commit/?id=fe1bab4d35e6e3ab8ea8742556474ddedfdfeccb
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 archival/libarchive/bz/blocksort.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/archival/libarchive/bz/blocksort.c b/archival/libarchive/bz/blocksort.c
index c2d5f15c6..fe2b2c2f2 100644
--- a/archival/libarchive/bz/blocksort.c
+++ b/archival/libarchive/bz/blocksort.c
@@ -852,7 +852,7 @@ void mainSort(EState* state,
 	 */
 
 	for (i = 0; /*i <= 255*/; i++) {
-		int32_t ss;
+		unsigned ss;
 
 		/*
 		 * Process big buckets, starting with the least full.
@@ -980,14 +980,14 @@ void mainSort(EState* state,
 		bigDone[ss] = True;
 
 		{
-			int32_t bbStart = ftab[ss << 8] & CLEARMASK;
-			int32_t bbSize  = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart;
-			int32_t shifts  = 0;
+			unsigned bbStart = ftab[ss << 8] & CLEARMASK;
+			unsigned bbSize  = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart;
+			unsigned shifts  = 0;
 
 			while ((bbSize >> shifts) > 65534) shifts++;
 
 			for (j = bbSize-1; j >= 0; j--) {
-				int32_t a2update   = ptr[bbStart + j];
+				unsigned a2update  = ptr[bbStart + j]; /* uint32[] */
 				uint16_t qVal      = (uint16_t)(j >> shifts);
 				quadrant[a2update] = qVal;
 				if (a2update < BZ_N_OVERSHOOT)


More information about the busybox-cvs mailing list