cli: properly format 64bit values
authorJo-Philipp Wich <jo@mein.io>
Wed, 1 Jun 2016 14:47:00 +0000 (16:47 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 1 Jun 2016 14:47:00 +0000 (16:47 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
main.c

diff --git a/main.c b/main.c
index 960b003c15d7b944c2ddc89ee64df618098124c5..bbb2bbdc74efa83a7692d72b6711ceb0ef7e7eb2 100644 (file)
--- a/main.c
+++ b/main.c
@@ -16,6 +16,7 @@
 
 #include <stdio.h>
 #include <stdbool.h>
+#include <stdint.h>
 #include <unistd.h>
 #include <errno.h>
 
@@ -211,7 +212,7 @@ export_value(struct list_head *matches, const char *prefix, const char *sep,
 
                        case json_type_int:
                                print_separator(sep, &sc, sl);
-                               printf("%d", json_object_get_int(item->jsobj));
+                               printf("%" PRId64, json_object_get_int64(item->jsobj));
                                break;
 
                        case json_type_double: