projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0b3aa9
)
src/utils_format_json.c: Use "isfinite" rather than "isinf".
author
Florian Forster
<octo@huhu.verplant.org>
Thu, 4 Feb 2010 12:07:43 +0000
(13:07 +0100)
committer
Florian Forster
<octo@huhu.verplant.org>
Thu, 4 Feb 2010 12:07:43 +0000
(13:07 +0100)
Makes it a bit easier to read.
src/utils_format_json.c
patch
|
blob
|
history
diff --git
a/src/utils_format_json.c
b/src/utils_format_json.c
index
dda2234
..
75a73ae
100644
(file)
--- a/
src/utils_format_json.c
+++ b/
src/utils_format_json.c
@@
-99,10
+99,10
@@
static int values_to_json (char *buffer, size_t buffer_size, /* {{{ */
if (ds->ds[i].type == DS_TYPE_GAUGE)
{
- if(isnan(vl->values[i].gauge) || isinf(vl->values[i].gauge))
- BUFFER_ADD ("null");
- else
+ if(isfinite (vl->values[i].gauge))
BUFFER_ADD ("%g", vl->values[i].gauge);
+ else
+ BUFFER_ADD ("null");
}
else if (ds->ds[i].type == DS_TYPE_COUNTER)
BUFFER_ADD ("%llu", vl->values[i].counter);