diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-07-25 16:24:02 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-07-25 16:24:02 -0700 |
commit | 98ec1decb14c3d76a088e0f1b1fe5c275726144c (patch) | |
tree | 66db4ba3cdcdf4de169a12e28334a074437c45bf /pcap-usb-linux.c | |
parent | 2d96be0322d71ce62e2f68d038070b10a7c9201b (diff) |
Squelch more signed vs. unsigned comparison warnings.
Diffstat (limited to 'pcap-usb-linux.c')
-rw-r--r-- | pcap-usb-linux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c index c1e83ae7..8d06a96c 100644 --- a/pcap-usb-linux.c +++ b/pcap-usb-linux.c @@ -676,7 +676,7 @@ usb_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *u * a partial information. * At least until linux 2.6.17 there is no way to set usbmon intenal buffer * length and default value is 130. */ - while ((string[0] != 0) && (string[1] != 0) && (pkth.caplen < handle->snapshot)) + while ((string[0] != 0) && (string[1] != 0) && (pkth.caplen < (bpf_u_int32)handle->snapshot)) { rawdata[0] = ascii_to_int(string[0]) * 16 + ascii_to_int(string[1]); rawdata++; @@ -689,8 +689,8 @@ usb_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *u got: uhdr->data_len = data_len; - if (pkth.caplen > handle->snapshot) - pkth.caplen = handle->snapshot; + if (pkth.caplen > (bpf_u_int32)handle->snapshot) + pkth.caplen = (bpf_u_int32)handle->snapshot; if (handle->fcode.bf_insns == NULL || bpf_filter(handle->fcode.bf_insns, handle->buffer, @@ -825,7 +825,7 @@ usb_read_linux_bin(pcap_t *handle, int max_packets, pcap_handler callback, u_cha struct mon_bin_get info; int ret; struct pcap_pkthdr pkth; - int clen = handle->snapshot - sizeof(pcap_usb_header); + u_int clen = handle->snapshot - sizeof(pcap_usb_header); /* the usb header is going to be part of 'packet' data*/ info.hdr = (pcap_usb_header*) handle->buffer; |