]> The Tcpdump Group git mirrors - tcpdump/commitdiff
We're not doing setjmp/longjmp, so no need for static variables.
authorGuy Harris <[email protected]>
Mon, 13 Jul 2015 19:50:01 +0000 (12:50 -0700)
committerGuy Harris <[email protected]>
Mon, 13 Jul 2015 19:50:01 +0000 (12:50 -0700)
We stopped doing setjmp/longjmp a while ago (it could cause issues on
multiple platforms), so we don't need to make pointer variables static
in the lookup routines.

addrtoname.c

index af6afb71a04a0101ea1be330f7b52856f353d51e..7cb040efb484f5226c35213bdd17332175667dad 100644 (file)
@@ -222,7 +222,7 @@ getname(netdissect_options *ndo, const u_char *ap)
 {
        register struct hostent *hp;
        uint32_t addr;
-       static struct hnamemem *p;              /* static for longjmp() */
+       struct hnamemem *p;
 
        memcpy(&addr, ap, sizeof(addr));
        p = &hnametable[addr & (HASHNAMESIZE-1)];
@@ -276,7 +276,7 @@ getname6(netdissect_options *ndo, const u_char *ap)
                        uint16_t d;
                } addra;
        } addr;
-       static struct h6namemem *p;             /* static for longjmp() */
+       struct h6namemem *p;
        register const char *cp;
        char ntop_buf[INET6_ADDRSTRLEN];