diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
commit | 3c315f0fff93aa072472abc10815963ac0035268 (patch) | |
tree | a95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /libnetdata/json/json.c | |
parent | Adding upstream version 1.35.1. (diff) | |
download | netdata-3c315f0fff93aa072472abc10815963ac0035268.tar.xz netdata-3c315f0fff93aa072472abc10815963ac0035268.zip |
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/json/json.c')
-rw-r--r-- | libnetdata/json/json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libnetdata/json/json.c b/libnetdata/json/json.c index 1f391eeaa..e03556b50 100644 --- a/libnetdata/json/json.c +++ b/libnetdata/json/json.c @@ -111,7 +111,7 @@ int json_callback_print(JSON_ENTRY *e) break; case JSON_NUMBER: - sprintf(txt,"%Lf", e->data.number); + sprintf(txt, NETDATA_DOUBLE_FORMAT_AUTO, e->data.number); buffer_strcat(wb,txt); break; @@ -168,7 +168,7 @@ static inline void json_jsonc_set_integer(JSON_ENTRY *e, char *key, int64_t valu e->type = JSON_NUMBER; memcpy(e->name, key, len); e->name[len] = 0; - e->data.number = value; + e->data.number = (NETDATA_DOUBLE)value; } /** |