From a070b0de9f9e9cbca150eea4eda74757ca588bed Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Wed, 23 Sep 2020 17:50:52 +0200 Subject: [HICN-645] Control plane (WIP) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4be6a40b690b62f22f57de6d8c10b01a1be42a6d Signed-off-by: Jordan Augé Signed-off-by: Enrico Loparco (eloparco) Signed-off-by: Mauro Sardara --- hicn-light/src/hicn/base/bitmap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hicn-light/src/hicn/base/bitmap.h') diff --git a/hicn-light/src/hicn/base/bitmap.h b/hicn-light/src/hicn/base/bitmap.h index 4a78af567..ebc3dddbb 100644 --- a/hicn-light/src/hicn/base/bitmap.h +++ b/hicn-light/src/hicn/base/bitmap.h @@ -43,8 +43,8 @@ typedef uint_fast32_t bitmap_t; * @param[in] max_size Bitmap max_size */ #define bitmap_init(bitmap, init_size, max_size) \ - vector_init(bitmap, next_pow2(init_size / BITMAP_WIDTH(bitmap)), \ - max_size == 0 ? 0 : next_pow2(max_size / BITMAP_WIDTH(bitmap))) + vector_init(bitmap, next_pow2((init_size) / BITMAP_WIDTH(bitmap)), \ + max_size == 0 ? 0 : next_pow2((max_size) / BITMAP_WIDTH(bitmap))) /* * @brief Ensures a bitmap is sufficiently large to hold an element at the @@ -156,7 +156,7 @@ bitmap_set_range(bitmap_t * bitmap, off_t from, off_t to) */ if ((pos_to != BITMAP_WIDTH(bitmap) - 1) && (offset_to != offset_from)) { size_t to_start = MAX(from, offset_to * BITMAP_WIDTH(bitmap)); - for (size_t k = to_start; k < to; k++) { + for (size_t k = to_start; k < (size_t) to; k++) { if (bitmap_set(bitmap, k) < 0) goto END; } -- cgit 1.2.3-korg