make the return value more logic

as if clz() were returning 32 on empty size
This commit is contained in:
Anatol Belski 2014-09-20 02:14:35 +02:00
parent 7b4e8c64e0
commit ea6da30396

View File

@ -1054,7 +1054,7 @@ static zend_always_inline int zend_mm_small_size_to_bit(int size)
if (!BitScanReverse(&index, (unsigned long)size)) {
/* undefined behavior */
return 32;
return 64;
}
return (((31 - (int)index) ^ 0x1f) + 1);