]> The Tcpdump Group git mirrors - tcpdump/blobdiff - addrtoname.c
Fix two invalid tests
[tcpdump] / addrtoname.c
index 33ae275283eacdcf6717b707301812e7376e3195..914665c2315a2d8b8fed7bdf1b6c2a4edb8692ab 100644 (file)
@@ -1285,7 +1285,7 @@ newhnamemem(netdissect_options *ndo)
        static struct hnamemem *ptr = NULL;
        static u_int num = 0;
 
-       if (num  <= 0) {
+       if (num  == 0) {
                num = 64;
                ptr = (struct hnamemem *)calloc(num, sizeof (*ptr));
                if (ptr == NULL)
@@ -1305,7 +1305,7 @@ newh6namemem(netdissect_options *ndo)
        static struct h6namemem *ptr = NULL;
        static u_int num = 0;
 
-       if (num  <= 0) {
+       if (num  == 0) {
                num = 64;
                ptr = (struct h6namemem *)calloc(num, sizeof (*ptr));
                if (ptr == NULL)