mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Drop misleading comments about undefined behavior (GH-17532)
There is no undefined behavior here. If `BitScan*()` returns zero, the value written to the first parameter is undefined, but we return a reasonable value.
This commit is contained in:
parent
d6c6675bfe
commit
ab996934eb
1 changed files with 0 additions and 2 deletions
|
@ -60,7 +60,6 @@ ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_ulong_ntz(zend_ulong num
|
|||
#else
|
||||
if (!BitScanForward(&index, num)) {
|
||||
#endif
|
||||
/* undefined behavior */
|
||||
return SIZEOF_ZEND_LONG * 8;
|
||||
}
|
||||
|
||||
|
@ -98,7 +97,6 @@ ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_ulong_nlz(zend_ulong num
|
|||
#else
|
||||
if (!BitScanReverse(&index, num)) {
|
||||
#endif
|
||||
/* undefined behavior */
|
||||
return SIZEOF_ZEND_LONG * 8;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue