]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch signed vs. unsigned comparison warnings.
authorGuy Harris <[email protected]>
Mon, 25 Jul 2016 00:24:54 +0000 (17:24 -0700)
committerGuy Harris <[email protected]>
Mon, 25 Jul 2016 00:24:54 +0000 (17:24 -0700)
We know len is >= 1, hence > 0, at that point, so just cast it to
unsigned.

bpf/net/bpf_filter.c

index 9abbd5406d2c8a25fd287acf78fdcb6f9134f8e1..c6660877d0330eb401248662fbf38545c5087097 100644 (file)
@@ -633,7 +633,7 @@ bpf_validate(f, len)
                return 0;
 #endif
 
-       for (i = 0; i < len; ++i) {
+       for (i = 0; i < (u_int)len; ++i) {
                p = &f[i];
                switch (BPF_CLASS(p->code)) {
                /*