]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Marc Binderberger: check whether XXX is null before checking
authorGuy Harris <[email protected]>
Thu, 26 Feb 2009 09:24:10 +0000 (01:24 -0800)
committerGuy Harris <[email protected]>
Thu, 26 Feb 2009 09:24:10 +0000 (01:24 -0800)
whether XXX->YYY is null.

util.c

diff --git a/util.c b/util.c
index 6b723e543c603c4314af3053c1d28f89db2fb252..784b09b788b03f17e12dccc099321613e50a2ae3 100644 (file)
--- 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) {