mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
hooks: fix datatype for bitmask
This commit is contained in:
parent
25fb713213
commit
7144190fea
1 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@
|
|||
#include <villas/sample.h>
|
||||
|
||||
struct average {
|
||||
int mask;
|
||||
uint64_t mask;
|
||||
int offset;
|
||||
};
|
||||
|
||||
|
@ -42,7 +42,7 @@ static int average_parse(struct hook *h, json_t *cfg)
|
|||
int ret;
|
||||
json_error_t err;
|
||||
|
||||
ret = json_unpack_ex(cfg, &err, 0, "{ s: i, s: i }",
|
||||
ret = json_unpack_ex(cfg, &err, 0, "{ s: i, s: I }",
|
||||
"offset", &p->offset,
|
||||
"mask", &p->mask
|
||||
);
|
||||
|
@ -62,7 +62,7 @@ static int average_process(struct hook *h, struct sample *smps[], unsigned *cnt)
|
|||
int n = 0;
|
||||
|
||||
for (int k = 0; k < smp->length; k++) {
|
||||
if (!(p->mask & (1 << k)))
|
||||
if (!(p->mask & (1LL << k)))
|
||||
continue;
|
||||
|
||||
switch (sample_format(smps[i], k)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue