summaryrefslogtreecommitdiff
path: root/addrtoname.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2016-08-24 19:30:56 +0200
committerFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2016-08-25 09:48:49 +0200
commit12857bf113ae8409fbdf994ca9c6a5977dd77856 (patch)
tree88e43ac6fbdcfcc277752b9368972817d0491e8b /addrtoname.c
parent89789e51d5885c520ead7459440198c6fbcefc01 (diff)
downloadtcpdump-12857bf113ae8409fbdf994ca9c6a5977dd77856.tar.gz
Improve code readability: A pointer should not be compared to zero
Using Coccinelle script badzero.cocci
Diffstat (limited to 'addrtoname.c')
-rw-r--r--addrtoname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/addrtoname.c b/addrtoname.c
index a79aba7d..5831b346 100644
--- a/addrtoname.c
+++ b/addrtoname.c
@@ -1205,7 +1205,7 @@ dnaddr_string(netdissect_options *ndo, u_short dnaddr)
{
register struct hnamemem *tp;
- for (tp = &dnaddrtable[dnaddr & (HASHNAMESIZE-1)]; tp->nxt != 0;
+ for (tp = &dnaddrtable[dnaddr & (HASHNAMESIZE-1)]; tp->nxt != NULL;
tp = tp->nxt)
if (tp->addr == dnaddr)
return (tp->name);