summaryrefslogtreecommitdiff
path: root/ext/sockets/multicast.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-25 19:24:55 +0200
committerAnatol Belski <ab@php.net>2014-08-25 19:24:55 +0200
commitc3e3c98ec666812daaaca896cf5ef758a8a6df14 (patch)
treed82a76de5c8d117d1cf2dcca19bb30a283621870 /ext/sockets/multicast.c
parent0cf2dbdf58645b52cb6582b1b2571c5cd9e9e6b3 (diff)
downloadphp-git-c3e3c98ec666812daaaca896cf5ef758a8a6df14.tar.gz
master renames phase 1
Diffstat (limited to 'ext/sockets/multicast.c')
-rw-r--r--ext/sockets/multicast.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c
index 9188825e53..4834bb39e0 100644
--- a/ext/sockets/multicast.c
+++ b/ext/sockets/multicast.c
@@ -89,14 +89,14 @@ static int php_get_if_index_from_zval(zval *val, unsigned *out TSRMLS_DC)
{
int ret;
- if (Z_TYPE_P(val) == IS_INT) {
- if (Z_IVAL_P(val) < 0 || Z_IVAL_P(val) > UINT_MAX) {
+ if (Z_TYPE_P(val) == IS_LONG) {
+ if (Z_LVAL_P(val) < 0 || Z_LVAL_P(val) > UINT_MAX) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"the interface index cannot be negative or larger than %u;"
- " given %pd", UINT_MAX, Z_IVAL_P(val));
+ " given %pd", UINT_MAX, Z_LVAL_P(val));
ret = FAILURE;
} else {
- *out = Z_IVAL_P(val);
+ *out = Z_LVAL_P(val);
ret = SUCCESS;
}
} else {
@@ -289,12 +289,12 @@ int php_do_setsockopt_ip_mcast(php_socket *php_sock,
case IP_MULTICAST_TTL:
convert_to_int_ex(arg4);
- if (Z_IVAL_P(arg4) < 0L || Z_IVAL_P(arg4) > 255L) {
+ if (Z_LVAL_P(arg4) < 0L || Z_LVAL_P(arg4) > 255L) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Expected a value between 0 and 255");
return FAILURE;
}
- ipv4_mcast_ttl_lback = (unsigned char) Z_IVAL_P(arg4);
+ ipv4_mcast_ttl_lback = (unsigned char) Z_LVAL_P(arg4);
ipv4_loop_ttl:
opt_ptr = &ipv4_mcast_ttl_lback;
optlen = sizeof(ipv4_mcast_ttl_lback);
@@ -354,12 +354,12 @@ int php_do_setsockopt_ipv6_mcast(php_socket *php_sock,
goto ipv6_loop_hops;
case IPV6_MULTICAST_HOPS:
convert_to_int_ex(arg4);
- if (Z_IVAL_P(arg4) < -1L || Z_IVAL_P(arg4) > 255L) {
+ if (Z_LVAL_P(arg4) < -1L || Z_LVAL_P(arg4) > 255L) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Expected a value between -1 and 255");
return FAILURE;
}
- ov = (int) Z_IVAL_P(arg4);
+ ov = (int) Z_LVAL_P(arg4);
ipv6_loop_hops:
opt_ptr = &ov;
optlen = sizeof(ov);