projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22b9f54
)
plugin_dispatch_multivalue: Submit NAN when computing percantage of an empty set.
author
Florian Forster
<octo@collectd.org>
Mon, 5 Sep 2016 13:45:19 +0000
(15:45 +0200)
committer
Florian Forster
<octo@collectd.org>
Mon, 5 Sep 2016 13:45:21 +0000
(15:45 +0200)
src/daemon/plugin.c
patch
|
blob
|
history
diff --git
a/src/daemon/plugin.c
b/src/daemon/plugin.c
index
1deabba
..
a8e6ca1
100644
(file)
--- a/
src/daemon/plugin.c
+++ b/
src/daemon/plugin.c
@@
-2273,7
+2273,7
@@
int plugin_dispatch_multivalue (value_list_t const *template, /* {{{ */
case DS_TYPE_GAUGE:
vl->values[0].gauge = va_arg (ap, gauge_t);
if (store_percentage)
- vl->values[0].gauge *= sum ? (100.0 / sum) :
0
;
+ vl->values[0].gauge *= sum ? (100.0 / sum) :
NAN
;
break;
case DS_TYPE_ABSOLUTE:
vl->values[0].absolute = va_arg (ap, absolute_t);