]> The Tcpdump Group git mirrors - libpcap/commitdiff
Make the FDDI padding unsigned.
authorGuy Harris <[email protected]>
Sun, 7 Aug 2016 22:11:07 +0000 (15:11 -0700)
committerGuy Harris <[email protected]>
Sun, 7 Aug 2016 22:11:07 +0000 (15:11 -0700)
It's never negative, and it's compared against unsigned values, so
squelch signed vs. unsigned comparison warnings.

gencode.c
pcap-bpf.c
pcap-int.h

index a4cd20473080db76958ac33df9e289bbcebfda83..b0cadc32d702e6483c46d4e440a618c6d76d0d46 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -275,7 +275,7 @@ struct _compiler_state {
        u_int vlan_stack_depth;
 
        /* XXX */
-       int pcap_fddipad;
+       u_int pcap_fddipad;
 
 #ifdef INET6
        /*
index bf4eebe5052c0466057be58285667df0f831f964..31a564286b4fa322800d790a14de89568a0d03bc 100644 (file)
@@ -144,7 +144,7 @@ static int bpf_load(char *errbuf);
  */
 struct pcap_bpf {
 #ifdef PCAP_FDDIPAD
-       int fddipad;
+       u_int fddipad;
 #endif
 
 #ifdef HAVE_ZEROCOPY_BPF
@@ -909,7 +909,7 @@ pcap_read_bpf(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
        register u_char *bp, *ep;
        u_char *datap;
 #ifdef PCAP_FDDIPAD
-       register int pad;
+       register u_int pad;
 #endif
 #ifdef HAVE_ZEROCOPY_BPF
        int i;
index 8baa7ada6e88873c1e7381c80651d2a6d7aea952..7db7ff5e688d967e5aa14901de6eb3d69d78df8a 100644 (file)
@@ -180,7 +180,7 @@ struct pcap {
 
        int swapped;
        FILE *rfile;            /* null if live capture, non-null if savefile */
-       int fddipad;
+       u_int fddipad;
        struct pcap *next;      /* list of open pcaps that need stuff cleared on close */
 
        /*