From: Matthew Macy Date: Mon, 21 Oct 2019 03:37:30 +0000 (-0700) Subject: Use correct format string when printing int8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=685abd595cf8e058cc7233d6e4f1ffc2dce88695;p=zfs Use correct format string when printing int8 Reviewed-by: Igor Kozhukhov Reviewed-by: Ryan Moeller Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Closes #9486 --- 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;