From: Guy Harris Date: Mon, 13 Jul 2015 19:50:01 +0000 (-0700) Subject: We're not doing setjmp/longjmp, so no need for static variables. X-Git-Tag: tcpdump-4.8.0~213 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/1c8a77f92b48a74c814821d4f969e24a16fe6b36?hp=3ba4165c4b7cc369c9b7809a8f106cad0926c02c We're not doing setjmp/longjmp, so no need for static variables. 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. --- diff --git a/addrtoname.c b/addrtoname.c index af6afb71..7cb040ef 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -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];