git: fc3e5334ab89 - main - Fix "%hhi" conversion for kvprintf()
Date: Fri, 28 Jun 2024 15:00:54 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc3e5334ab891eab22a4278384be6f9b74d6d91a commit fc3e5334ab891eab22a4278384be6f9b74d6d91a Author: Sebastian Huber <sebastian.huber@embedded-brains.de> AuthorDate: 2024-06-13 11:01:31 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-06-28 14:57:39 +0000 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 --- 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 e291a1fa00a6..4dc989e2d1f1 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -904,7 +904,7 @@ handle_sign: 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: