]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] fix false positive compiler warning
authorEvan Hunt <each@isc.org>
Sat, 15 Nov 2014 08:56:30 +0000 (00:56 -0800)
committerEvan Hunt <each@isc.org>
Sat, 15 Nov 2014 08:56:30 +0000 (00:56 -0800)
a "pointer always evaluates to true" warning was blocking
compilation of the radix ATF test when using --enable-developer
with gcc 4.8.2.

lib/isc/include/isc/radix.h

index 24c183f2c2150b2b05b58950c135294e1dcde116..ed6de39985d4d1704ff6a016826ee91b46c4f509 100644 (file)
@@ -34,8 +34,9 @@
 
 #define NETADDR_TO_PREFIX_T(na,pt,bits,is_ecs) \
        do { \
+               const void *p = na; \
                memset(&(pt), 0, sizeof(pt)); \
-               if((na) != NULL) { \
+               if (p != NULL) { \
                        (pt).family = (na)->family; \
                        (pt).bitlen = (bits); \
                        if ((pt).family == AF_INET6) { \