diff options
author | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2016-08-24 19:30:56 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2016-08-25 09:48:49 +0200 |
commit | 12857bf113ae8409fbdf994ca9c6a5977dd77856 (patch) | |
tree | 88e43ac6fbdcfcc277752b9368972817d0491e8b /addrtoname.c | |
parent | 89789e51d5885c520ead7459440198c6fbcefc01 (diff) | |
download | tcpdump-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.c | 2 |
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); |