summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mysqlnd/mysqlnd_alloc.c2
-rw-r--r--ext/sockets/multicast.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c
index a1471dd557..e4fe274901 100644
--- a/ext/mysqlnd/mysqlnd_alloc.c
+++ b/ext/mysqlnd/mysqlnd_alloc.c
@@ -155,8 +155,8 @@ static void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
- zend_long * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold);
#if PHP_DEBUG
+ zend_long * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold);
TRACE_ALLOC_ENTER(mysqlnd_ecalloc_name);
{
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));