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

Fix division by zero

This commit is contained in:
Steffen Vogel 2015-10-14 12:12:53 +02:00
parent d85db3f604
commit ea74bcd5c8

View file

@ -376,7 +376,7 @@ int hook_stats(struct path *p, struct hook *h, int when)
case HOOK_PERIODIC: {
char *buf = path_print(p);
if (p->received > 0)
if (p->received > 1)
stats("%-40s|%10.2g|%10.2f|%10u|%10u|%10u|%10u|%10u|%10u|%10u|", buf,
p->hist_owd.last, 1 / p->hist_gap_msg.last,
p->sent, p->received, p->dropped, p->skipped, p->invalid, p->overrun, list_length(p->current)