Browse Source

Proper use of the BMAP_EL_INIT_VAL macro

Ioannis Koutras 12 years ago
parent
commit
364d67a7ee
2 changed files with 2 additions and 3 deletions
  1. 1 1
      private-include/bitmap/bitmap_rb.h
  2. 1 2
      src/raw_block.c

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

@@ -36,7 +36,7 @@
 /** The size of bitmap array element in bits */
 #define BMAP_EL_SIZE_BITS (BMAP_EL_SIZE * 8)
 /** Bitmap's initial value */
-#define BMAP_EL_INIT_VAL ~((BMAP_EL_TYPE) 0))
+#define BMAP_EL_INIT_VAL ~((BMAP_EL_TYPE) 0)
 /** How many bytes per cell should be used */
 #define BITMAP_RESOLUTION 256
 

+ 1 - 2
src/raw_block.c

@@ -72,8 +72,7 @@ raw_block_header_t *create_new_raw_block(size_t raw_block_size, rb_type type) {
 
             bitmap_p = &bitmap_rb->bmap;
             for(size_t i = 0; i < bitmap_rb->elements; ++i) {
-                /* *bitmap_p = BMAP_EL_INIT_VAL; */
-                *bitmap_p = ~((BMAP_EL_TYPE) 0);
+                *bitmap_p = BMAP_EL_INIT_VAL;
                 bitmap_p++;
             }
             break;