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
This commit is contained in:
Matthew Macy 2019-10-20 20:37:30 -07:00 committed by Brian Behlendorf
parent 8b2d097c17
commit 685abd595c
1 changed files with 1 additions and 1 deletions

View File

@ -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;