Browse Source

use CHAR_BIT instead of 8

Ioannis Koutras 12 years ago
parent
commit
d880def859
1 changed files with 2 additions and 1 deletions
  1. 2 1
      private-include/bitmap/bitmap_rb.h

+ 2 - 1
private-include/bitmap/bitmap_rb.h

@@ -27,6 +27,7 @@
 #include "dmm_config.h"
 
 #include <inttypes.h>
+#include <limits.h>
 #include <stddef.h> /* for size_t */
 
 /** The data type of the bitmap array element */
@@ -34,7 +35,7 @@
 /** The size of bitmap array element */
 #define BMAP_EL_SIZE sizeof(BMAP_EL_TYPE)
 /** The size of bitmap array element in bits */
-#define BMAP_EL_SIZE_BITS (BMAP_EL_SIZE * 8)
+#define BMAP_EL_SIZE_BITS (BMAP_EL_SIZE * CHAR_BIT)
 /** Bitmap's initial value */
 #define BMAP_EL_INIT_VAL ~((BMAP_EL_TYPE) 0)