[Freeswitch-svn] [commit] r6779 - freeswitch/trunk/src/include
Freeswitch SVN
mikej at freeswitch.org
Thu Dec 13 19:43:08 EST 2007
Author: mikej
Date: Thu Dec 13 19:43:08 2007
New Revision: 6779
Modified:
freeswitch/trunk/src/include/switch_bitpack.h
Log:
assert some bounds values that should never be out of bounds (or the arrays would be out of bounds anyways)
Modified: freeswitch/trunk/src/include/switch_bitpack.h
==============================================================================
--- freeswitch/trunk/src/include/switch_bitpack.h (original)
+++ freeswitch/trunk/src/include/switch_bitpack.h Thu Dec 13 19:43:08 2007
@@ -99,10 +99,7 @@
pack->bits_cur = pack->over;
if (pack->mode == SWITCH_BITPACK_MODE_RFC3551) {
- while (pack->over > 8) {
- pack->over -= 8;
- }
- if (pack->over > 8) return;
+ switch_assert(pack->over <= 8);
this_byte &= SWITCH_BITPACKED_MASKS[pack->over];
this_byte <<= pack->under;
*pack->cur |= this_byte;
More information about the Freeswitch-svn
mailing list