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

stats: destructors should have an integer return type

This commit is contained in:
Steffen Vogel 2017-07-09 14:37:02 +02:00
parent 49c0e9957a
commit f1c51c6b95
3 changed files with 6 additions and 7 deletions

View file

@ -67,7 +67,7 @@ struct stats {
int stats_init(struct stats *s, int buckets, int warmup);
void stats_destroy(struct stats *s);
int stats_destroy(struct stats *s);
void stats_update(struct stats_delta *s, enum stats_id id, double val);

View file

@ -67,9 +67,7 @@ static int stats_collect_destroy(struct hook *h)
{
struct stats_collect *p = h->_vd;
stats_destroy(&p->stats);
return 0;
return stats_destroy(&p->stats);
}
static int stats_collect_start(struct hook *h)

View file

@ -52,13 +52,14 @@ int stats_init(struct stats *s, int buckets, int warmup)
return 0;
}
void stats_destroy(struct stats *s)
int stats_destroy(struct stats *s)
{
for (int i = 0; i < STATS_COUNT; i++) {
for (int i = 0; i < STATS_COUNT; i++)
hist_destroy(&s->histograms[i]);
}
free(s->delta);
return 0;
}
void stats_update(struct stats_delta *d, enum stats_id id, double val)