In case that Rob Landley isn't convinced, there is another argument supporting casting to unsigned before bit shifting:
There are little cases that left shifting to sign bit is actually useful. AFAIK, the use of 1<<31 cases are no other than 1. intended to represent a signed INTn_MIN constant, 2. intended to do arithmetic (signed) left shift, without checking overflow (a bad coding practice and potential bug), 3. doing shift on a bitfield or unsigned int but forgot to cast it to unsigned. It seems to me that this bunzip2 case is case 3, and for readability I support changing the variable types to unsigned where they should be. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
