From 0a9e69cc6feb87380219450100299705755b533a Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 7 Oct 2002 22:58:24 +0000 Subject: [PATCH] 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 --- sys/dev/cardbus/cardbusreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cardbus/cardbusreg.h b/sys/dev/cardbus/cardbusreg.h index ec3157e4780..c356323d212 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))