com php-src: make the return value more logic: Zend/zend_allo c.c
| From: | Anatol Belski | Date: | Sat, 20 Sep 2014 00:14:35 +0000 |
| Subject: | com php-src: make the return value more logic: Zend/zend_allo c.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81795@lists.php.net to get a copy of this message | ||
Commit: ea6da303960707c8305a74f7a33f5694f8f0b235
Author: Anatol Belski <ab@php.net> Sat, 20 Sep 2014 02:14:35 +0200
Parents: 7b4e8c64e059108a612ba04feddf0e395633d081
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ea6da303960707c8305a74f7a33f5694f8f0b235
Log:
make the return value more logic
as if clz() were returning 32 on empty size
Changed paths:
M Zend/zend_alloc.c
Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 77a8251..ac40361 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);