aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/gnunet_common.h4
-rw-r--r--src/util/service.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 2c11ae15f..94ecd06f8 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -933,8 +933,8 @@ GNUNET_ntoh_double (double d);
933 * entire memory being zero'ed out. 933 * entire memory being zero'ed out.
934 */ 934 */
935#define GNUNET_is_zero(a) ({ \ 935#define GNUNET_is_zero(a) ({ \
936 const typeof(*a) _z = { 0 }; \ 936 static const typeof(*a) _z; \
937 memcmp(a, \ 937 memcmp((a), \
938 &_z, \ 938 &_z, \
939 sizeof (_z)); }) 939 sizeof (_z)); })
940 940
diff --git a/src/util/service.c b/src/util/service.c
index 3fe9b5883..4fd16f93d 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -478,7 +478,7 @@ check_ipv6_listed (const struct GNUNET_STRINGS_IPv6NetworkPolicy *list,
478 return GNUNET_NO; 478 return GNUNET_NO;
479 i = 0; 479 i = 0;
480NEXT: 480NEXT:
481 while (0 != (GNUNET_is_zero (&list[i].network))) 481 while (0 != GNUNET_is_zero (&list[i].network))
482 { 482 {
483 for (j = 0; j < sizeof (struct in6_addr) / sizeof (int); j++) 483 for (j = 0; j < sizeof (struct in6_addr) / sizeof (int); j++)
484 if (((((int *) ip)[j] & ((int *) &list[i].netmask)[j])) != 484 if (((((int *) ip)[j] & ((int *) &list[i].netmask)[j])) !=