ck_bitmap: Use CK_BITMAP_OFFSET.

ck_pring
Samy Al Bahra 9 years ago
parent 7646fb624b
commit ff23c2d3fd

@ -47,7 +47,7 @@
#define CK_BITMAP_BLOCK (sizeof(unsigned int) * CHAR_BIT) #define CK_BITMAP_BLOCK (sizeof(unsigned int) * CHAR_BIT)
#define CK_BITMAP_OFFSET(i) ((i) % CK_BITMAP_BLOCK) #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_PTR(x, i) ((x) + ((i) / CK_BITMAP_BLOCK))
#define CK_BITMAP_BLOCKS(n) (((n) + CK_BITMAP_BLOCK - 1) / CK_BITMAP_BLOCK) #define CK_BITMAP_BLOCKS(n) (((n) + CK_BITMAP_BLOCK - 1) / CK_BITMAP_BLOCK)

Loading…
Cancel
Save