jsoninfo: helpers: fix output format for int/long
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 2 Dec 2015 15:18:56 +0000 (16:18 +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 38e60b5..c005a0c 100644 (file)
@@ -141,7 +141,7 @@ void abuf_json_string(struct autobuf *abuf, const char* key, const char* value)
 void abuf_json_int(struct autobuf *abuf, const char* key, long value) {
   abuf_json_insert_comma(abuf);
   abuf_json_new_indent(abuf);
-  abuf_appendf(abuf, "\"%s\": %li", key, value);
+  abuf_appendf(abuf, "\"%s\": %ld", key, value);
   entrynumber[currentjsondepth]++;
 }