jsoninfo: helpers: output floats in full precision
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 2 Dec 2015 16:59:06 +0000 (17:59 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 3 Dec 2015 11:00:08 +0000 (12:00 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/jsoninfo/src/olsrd_jsoninfo_helpers.c

index 4fa3f50..38e60b5 100644 (file)
@@ -148,7 +148,7 @@ void abuf_json_int(struct autobuf *abuf, const char* key, long value) {
 void abuf_json_float(struct autobuf *abuf, const char* key, float value) {
   abuf_json_insert_comma(abuf);
   abuf_json_new_indent(abuf);
-  abuf_appendf(abuf, "\"%s\": %.03f", key, (double) value);
+  abuf_appendf(abuf, "\"%s\": %f", key, (double) value);
   entrynumber[currentjsondepth]++;
 }