From d71ce25492c012e831bef0fb735a3162aa57e5af Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 13 Jun 2024 13:01:31 +0200 Subject: [PATCH] Fix "%hhi" conversion for kvprintf() The signedness of "char" is implementation-dependent. --- sys/kern/subr_prf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index e291a1fa00a62b..4dc989e2d1f1c0 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -904,7 +904,7 @@ reswitch: switch (ch = (u_char)*fmt++) { else if (hflag) num = (short)va_arg(ap, int); else if (cflag) - num = (char)va_arg(ap, int); + num = (signed char)va_arg(ap, int); else num = va_arg(ap, int); number: