Fix "%hhi" conversion for kvprintf()

The signedness of "char" is implementation-dependent.

Reviewed by: imp,zlei,nightquick@proton.me
Pull Request: https://github.com/freebsd/freebsd-src/pull/1290
This commit is contained in:
Sebastian Huber 2024-06-13 13:01:31 +02:00 committed by Warner Losh
parent 2eb64df7f5
commit fc3e5334ab

View file

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