]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rx.c
OpenFlow 1.0: fix OFPST_QUEUE decoding bug
[tcpdump] / print-rx.c
index 37e60b59c072f4004c8596a21ad03b86500d927a..383ef3713ffc17aea18a701e572910a01b145c05 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.40 2008-05-12 18:16:42 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.42 2008-07-01 07:44:50 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -653,7 +653,7 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport,
                        *opcode = rxent->opcode;
                        return(1);
                }
-               if (++i > RX_CACHE_SIZE)
+               if (++i >= RX_CACHE_SIZE)
                        i = 0;
        } while (i != rx_cache_hint);
 
@@ -707,7 +707,7 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport,
                        TCHECK2(bp[0], sizeof(u_int64_t)); \
                        i = EXTRACT_64BITS(bp); \
                        bp += sizeof(u_int64_t); \
-                       printf(" %llu", i); \
+                       printf(" %" PRIu64, i); \
                }
 
 #define DATEOUT() { time_t t; struct tm *tm; char str[256]; \