From: Anatol Belski Date: Sat, 20 Sep 2014 00:14:35 +0000 (+0200) Subject: make the return value more logic X-Git-Tag: POST_NATIVE_TLS_MERGE^2~169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea6da303960707c8305a74f7a33f5694f8f0b235;p=php make the return value more logic as if clz() were returning 32 on empty size --- diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 77a825115f..ac403617a6 100644 --- a/Zend/zend_alloc.c +++ b/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);