mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
ext/sockets: Use zval_is_true() instead of converting to boolean (#18681)
This commit is contained in:
parent
b05d50eac2
commit
279983dc8d
1 changed files with 2 additions and 4 deletions
|
@ -293,8 +293,7 @@ int php_do_setsockopt_ip_mcast(php_socket *php_sock,
|
|||
goto dosockopt;
|
||||
|
||||
case IP_MULTICAST_LOOP:
|
||||
convert_to_boolean(arg4);
|
||||
ipv4_mcast_ttl_lback = (unsigned char) (Z_TYPE_P(arg4) == IS_TRUE);
|
||||
ipv4_mcast_ttl_lback = (unsigned char) zval_is_true(arg4);
|
||||
goto ipv4_loop_ttl;
|
||||
|
||||
case IP_MULTICAST_TTL:
|
||||
|
@ -358,8 +357,7 @@ int php_do_setsockopt_ipv6_mcast(php_socket *php_sock,
|
|||
goto dosockopt;
|
||||
|
||||
case IPV6_MULTICAST_LOOP:
|
||||
convert_to_boolean(arg4);
|
||||
ov = (int) Z_TYPE_P(arg4) == IS_TRUE;
|
||||
ov = (int) zval_is_true(arg4);
|
||||
goto ipv6_loop_hops;
|
||||
case IPV6_MULTICAST_HOPS:
|
||||
convert_to_long(arg4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue