diff options
author | imp <imp@FreeBSD.org> | 2002-10-07 22:58:24 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-10-07 22:58:24 +0000 |
commit | 2046d1c9de8c006d7d150c7ea508116be15db021 (patch) | |
tree | b04fed13e885169e6e7158d36b0c32987c10e508 /sys/dev/cardbus | |
parent | 79238a644f2d4b793f57a3a0ccccc69aaa50f95d (diff) | |
download | FreeBSD-src-2046d1c9de8c006d7d150c7ea508116be15db021.zip FreeBSD-src-2046d1c9de8c006d7d150c7ea508116be15db021.tar.gz |
Don't abuse the fact that -a == ~a + 1. Signed vs unsigned checkers
complain when a is a unsigned type. So instead use the latter here
and be on our way.
Spotted by: flexlint by way of phk
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r-- | sys/dev/cardbus/cardbusreg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/cardbus/cardbusreg.h b/sys/dev/cardbus/cardbusreg.h index ec3157e..c356323 100644 --- a/sys/dev/cardbus/cardbusreg.h +++ b/sys/dev/cardbus/cardbusreg.h @@ -88,4 +88,4 @@ #define CARDBUS_MAPREG_MEM_ADDR(mr) \ ((mr) & CARDBUS_MAPREG_MEM_ADDR_MASK) #define CARDBUS_MAPREG_MEM_SIZE(mr) \ - (CARDBUS_MAPREG_MEM_ADDR(mr) & -CARDBUS_MAPREG_MEM_ADDR(mr)) + (CARDBUS_MAPREG_MEM_ADDR(mr) & (~CARDBUS_MAPREG_MEM_ADDR(mr) + 1)) |