Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jun 2024 18:13:00 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Warner Losh <imp@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: fc3e5334ab89 - main - Fix "%hhi" conversion for kvprintf()
Message-ID:  <Zn7S_J-H4Lg1GZcA@kib.kiev.ua>
In-Reply-To: <202406281500.45SF0sOZ057462@gitrepo.freebsd.org>
References:  <202406281500.45SF0sOZ057462@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 28, 2024 at 03:00:54PM +0000, Warner Losh wrote:
> 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:
Isn't the same fix needed for libexec/rtld-elf/rtld_printf.c ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Zn7S_J-H4Lg1GZcA>