From: Guy Harris Date: Thu, 26 Feb 2009 09:24:10 +0000 (-0800) Subject: From Marc Binderberger: check whether XXX is null before checking X-Git-Tag: tcpdump-4.1.0~139 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/0cd29d29174b83e6e700efbe77624eb1dabb8094 From Marc Binderberger: check whether XXX is null before checking whether XXX->YYY is null. --- diff --git a/util.c b/util.c index 6b723e54..784b09b7 100644 --- a/util.c +++ b/util.c @@ -328,7 +328,7 @@ bittok2str_internal(register const struct tok *lp, register const char *fmt, register int rotbit; /* this is the bit we rotate through all bitpositions */ register int tokval; - while (lp->s != NULL && lp != NULL) { + while (lp != NULL && lp->s != NULL) { tokval=lp->v; /* load our first value */ rotbit=1; while (rotbit != 0) {