[Olsr-dev] [PATCH v1 107/115] jsoninfo: helpers: output floats in full precision

Ferry Huberts (spam-protected)
Wed Dec 2 21:29:20 CET 2015


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 lib/jsoninfo/src/olsrd_jsoninfo_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/jsoninfo/src/olsrd_jsoninfo_helpers.c b/lib/jsoninfo/src/olsrd_jsoninfo_helpers.c
index 4fa3f50..38e60b5 100644
--- a/lib/jsoninfo/src/olsrd_jsoninfo_helpers.c
+++ b/lib/jsoninfo/src/olsrd_jsoninfo_helpers.c
@@ -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]++;
 }
 
-- 
2.5.0




More information about the Olsr-dev mailing list