Browse Source

make the return value more logic

as if clz() were returning 32 on empty size
pull/830/head
Anatol Belski 11 years ago
parent
commit
ea6da30396
  1. 2
      Zend/zend_alloc.c

2
Zend/zend_alloc.c

@ -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);

Loading…
Cancel
Save