diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-03-20 18:59:53 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-03-20 18:59:53 +0000 |
commit | d76fe3af70ccca92ac7cc0f189dd01beca3aef5e (patch) | |
tree | 992bc179ed8ad3670fea11070c571d34bb2b93fc /sys/dev/usb/usb_endian.h | |
parent | 83e8c0befefb680ec6805a51636a3602d8b25212 (diff) | |
download | FreeBSD-src-d76fe3af70ccca92ac7cc0f189dd01beca3aef5e.zip FreeBSD-src-d76fe3af70ccca92ac7cc0f189dd01beca3aef5e.tar.gz |
MFp4 //depot/projects/usb @159379,159380
Fixes for 8-bit and 16-bit compilation.
Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/usb_endian.h')
-rw-r--r-- | sys/dev/usb/usb_endian.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/usb/usb_endian.h b/sys/dev/usb/usb_endian.h index 2f49008..f7d2244 100644 --- a/sys/dev/usb/usb_endian.h +++ b/sys/dev/usb/usb_endian.h @@ -48,19 +48,19 @@ typedef uint8_t uQWord[8]; #define UGETW(w) \ ((w)[0] | \ - ((w)[1] << 8)) + (((uint16_t)((w)[1])) << 8)) #define UGETDW(w) \ ((w)[0] | \ - ((w)[1] << 8) | \ - ((w)[2] << 16) | \ - ((w)[3] << 24)) + (((uint16_t)((w)[1])) << 8) | \ + (((uint32_t)((w)[2])) << 16) | \ + (((uint32_t)((w)[3])) << 24)) #define UGETQW(w) \ ((w)[0] | \ - ((w)[1] << 8) | \ - ((w)[2] << 16) | \ - ((w)[3] << 24) | \ + (((uint16_t)((w)[1])) << 8) | \ + (((uint32_t)((w)[2])) << 16) | \ + (((uint32_t)((w)[3])) << 24) | \ (((uint64_t)((w)[4])) << 32) | \ (((uint64_t)((w)[5])) << 40) | \ (((uint64_t)((w)[6])) << 48) | \ |