diff options
| author | Andrew Thompson <thompsa@FreeBSD.org> | 2009-03-20 18:59:53 +0000 |
|---|---|---|
| committer | Andrew Thompson <thompsa@FreeBSD.org> | 2009-03-20 18:59:53 +0000 |
| commit | c629193176403ffdfbaa66772c0c0ba64c363961 (patch) | |
| tree | 992bc179ed8ad3670fea11070c571d34bb2b93fc /sys/dev/usb/usb_endian.h | |
| parent | 296ade601605af4b30830af11dfa59b71e6e3951 (diff) | |
Notes
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 2f4900870b70..f7d224448139 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) | \ |
