1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00

bitset: fix compiler error

This commit is contained in:
Steffen Vogel 2017-12-19 11:52:21 +01:00
parent 2ac5c221ee
commit 842df7c496

View file

@ -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;