[ccan] [PATCH] ccan/bitmap: const for bitmap_test_bit.

Rusty Russell rusty at rustcorp.com.au
Wed May 14 13:53:11 EST 2014


Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

diff --git a/ccan/bitmap/bitmap.h b/ccan/bitmap/bitmap.h
index 2be18f3..ee22d45 100644
--- a/ccan/bitmap/bitmap.h
+++ b/ccan/bitmap/bitmap.h
@@ -75,7 +75,7 @@ static inline void bitmap_change_bit(bitmap *bitmap, int n)
 	BITMAP_WORD(bitmap, n) ^= BITMAP_WORDBIT(n);
 }
 
-static inline bool bitmap_test_bit(bitmap *bitmap, int n)
+static inline bool bitmap_test_bit(const bitmap *bitmap, int n)
 {
 	return !!(BITMAP_WORD(bitmap, n) & BITMAP_WORDBIT(n));
 }


More information about the ccan mailing list