mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
decimate: avoid floating point exception
This commit is contained in:
parent
3c42811d8b
commit
be5358254f
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ static int decimate_process(struct hook *h, struct sample *smps[], unsigned *cnt
|
|||
|
||||
int i, ok;
|
||||
for (i = 0, ok = 0; i < *cnt; i++) {
|
||||
if (p->counter++ % p->ratio == 0) {
|
||||
if (p->ratio && p->counter++ % p->ratio == 0) {
|
||||
struct sample *tmp;
|
||||
|
||||
tmp = smps[ok];
|
||||
|
|
Loading…
Add table
Reference in a new issue