summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthew Macy <mmacy@freebsd.org>2019-10-20 20:37:30 -0700
committerBrian Behlendorf <behlendorf1@llnl.gov>2019-10-20 20:37:30 -0700
commit685abd595cf8e058cc7233d6e4f1ffc2dce88695 (patch)
tree708b9c9a19a0720b8f0f1583fa582d038860656d /lib
parent8b2d097c17bdf799b0b9a680b17b91d10ef8b6be (diff)
Use correct format string when printing int8
Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9486
Diffstat (limited to 'lib')
-rw-r--r--lib/libnvpair/libnvpair_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libnvpair/libnvpair_json.c b/lib/libnvpair/libnvpair_json.c
index 0b403f1af..37a392391 100644
--- a/lib/libnvpair/libnvpair_json.c
+++ b/lib/libnvpair/libnvpair_json.c
@@ -303,7 +303,7 @@ nvlist_print_json(FILE *fp, nvlist_t *nvl)
for (i = 0; i < valsz; i++) {
if (i > 0)
FPRINTF(fp, ",");
- FPRINTF(fp, "%hd", val[i]);
+ FPRINTF(fp, "%hhd", val[i]);
}
FPRINTF(fp, "]");
break;