From ff23c2d3fd0d224cd9418d05a47a65dc53b47a58 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Tue, 24 Nov 2015 17:57:21 -0500 Subject: [PATCH] ck_bitmap: Use CK_BITMAP_OFFSET. --- include/ck_bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ck_bitmap.h b/include/ck_bitmap.h index f57e2f2..624e953 100644 --- a/include/ck_bitmap.h +++ b/include/ck_bitmap.h @@ -47,7 +47,7 @@ #define CK_BITMAP_BLOCK (sizeof(unsigned int) * CHAR_BIT) #define CK_BITMAP_OFFSET(i) ((i) % CK_BITMAP_BLOCK) -#define CK_BITMAP_BIT(i) (1U << ((i) % CK_BITMAP_BLOCK)) +#define CK_BITMAP_BIT(i) (1U << CK_BITMAP_OFFSET(i)) #define CK_BITMAP_PTR(x, i) ((x) + ((i) / CK_BITMAP_BLOCK)) #define CK_BITMAP_BLOCKS(n) (((n) + CK_BITMAP_BLOCK - 1) / CK_BITMAP_BLOCK)