summaryrefslogtreecommitdiff
path: root/ext/sockets/multicast.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-12 13:50:48 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-12 13:50:48 +0200
commit89df0915299e718bf1bf49aacd1e92adb99d8c41 (patch)
treeccc77aecd5c82e7bac8326846ac2f6399ad481c7 /ext/sockets/multicast.c
parent650e49983949b2957e6d7785c99b13470e89e278 (diff)
parentcc89d260968746f1048029d711f113d2a9688a13 (diff)
downloadphp-git-89df0915299e718bf1bf49aacd1e92adb99d8c41.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/sockets/multicast.c')
-rw-r--r--ext/sockets/multicast.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c
index 2ede92bc6e..e874803656 100644
--- a/ext/sockets/multicast.c
+++ b/ext/sockets/multicast.c
@@ -463,8 +463,9 @@ static int _php_mcast_join_leave(
sizeof(greq));
#else
if (sock->type == AF_INET) {
- struct ip_mreq mreq = {{0}};
+ struct ip_mreq mreq;
struct in_addr addr;
+ memset(&mreq, 0, sizeof(struct ip_mreq));
assert(group_len == sizeof(struct sockaddr_in));
@@ -483,7 +484,8 @@ static int _php_mcast_join_leave(
}
#if HAVE_IPV6
else if (sock->type == AF_INET6) {
- struct ipv6_mreq mreq = {{0}};
+ struct ipv6_mreq mreq;
+ memset(&mreq, 0, sizeof(struct ipv6_mreq));
assert(group_len == sizeof(struct sockaddr_in6));