From 842df7c4966043c60b94291b7d2b826e0e6f5103 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 19 Dec 2017 11:52:21 +0100 Subject: [PATCH] bitset: fix compiler error --- lib/bitset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bitset.c b/lib/bitset.c index 0963668c6..f136ca013 100644 --- a/lib/bitset.c +++ b/lib/bitset.c @@ -51,7 +51,7 @@ void bitset_set_value(struct bitset *b, uintmax_t val) { bitset_clear_all(b); - for (size_t i = 0; i < b->dim; i++) { + for (size_t i = 0; i < b->dimension; i++) { if (val & (1 << i)) bitset_set(b, i); } @@ -61,7 +61,7 @@ uintmax_t bitset_get_value(struct bitset *b) { uintmax_t v = 0; - for (size_t i = 0; i < b->dim; i++) + for (size_t i = 0; i < b->dimension; i++) v += bitset_test(b, i) << i; return v; @@ -71,7 +71,7 @@ size_t bitset_count(struct bitset *b) { size_t cnt = 0; - for (size_t i = 0; i < b->dim; i++) + for (size_t i = 0; i < b->dimension; i++) cnt += bitset_test(b, i); return cnt;