summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e0b3aa9)
raw | patch | inline | side by side (parent: e0b3aa9)
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 |
index dda2234fdd53f19bff58b2f90b25f6d1277e47e7..75a73aeea4a00e0465f27e8fa09134ca04bea921 100644 (file)
--- a/src/utils_format_json.c
+++ b/src/utils_format_json.c
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);