diff options
Diffstat (limited to 'freebsd/contrib/libpcap/pcap-common.h')
-rw-r--r-- | freebsd/contrib/libpcap/pcap-common.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/freebsd/contrib/libpcap/pcap-common.h b/freebsd/contrib/libpcap/pcap-common.h index 88c057cb..8795a829 100644 --- a/freebsd/contrib/libpcap/pcap-common.h +++ b/freebsd/contrib/libpcap/pcap-common.h @@ -35,9 +35,13 @@ * machine (if the file was written in little-end order). */ #define SWAPLONG(y) \ -((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff)) + (((((u_int)(y))&0xff)<<24) | \ + ((((u_int)(y))&0xff00)<<8) | \ + ((((u_int)(y))&0xff0000)>>8) | \ + ((((u_int)(y))>>24)&0xff)) #define SWAPSHORT(y) \ - ( (((y)&0xff)<<8) | ((u_short)((y)&0xff00)>>8) ) + ((u_short)(((((u_int)(y))&0xff)<<8) | \ + ((((u_int)(y))&0xff00)>>8))) extern int dlt_to_linktype(int dlt); |