summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-10-20 20:37:30 -0700
committerBrian Behlendorf <[email protected]>2019-10-20 20:37:30 -0700
commit685abd595cf8e058cc7233d6e4f1ffc2dce88695 (patch)
tree708b9c9a19a0720b8f0f1583fa582d038860656d /lib
parent8b2d097c17bdf799b0b9a680b17b91d10ef8b6be (diff)
Use correct format string when printing int8
Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> 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;