[PATCH] stdio-common: Consistently use 'num_digits_len' in 'vfscanf'
Arjun Shankar
arjun@redhat.com
Mon May 26 15:06:12 GMT 2025
Hi Maciej,
> Make the only place use 'num_digits_len' where 10 is referred literally
> for a digit index in i18n handling for decimal integers. No change in
> code produced.
> ---
> Verified with a `powerpc64le-linux-gnu' native configuration.
Thanks! This looks good to me.
Reviewed-by: Arjun Shankar <arjun@redhat.com>
> ---
> stdio-common/vfscanf-internal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> glibc-scanf-num-digits-len.diff
> Index: glibc/stdio-common/vfscanf-internal.c
> ===================================================================
> --- glibc.orig/stdio-common/vfscanf-internal.c
> +++ glibc/stdio-common/vfscanf-internal.c
> @@ -1737,7 +1737,7 @@ __vfscanf_internal (FILE *s, const char
> #endif
> }
>
> - if (n < 10)
> + if (n < num_digits_len)
OK. There are no other similar instances of '10' within this scope
that need replacing.
> {
> /* Found it. */
> from_level = level;
>
More information about the Libc-alpha
mailing list