This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix build warnings in locale/programs/ld-ctype.c
- From: Florian Weimer <fweimer at redhat dot com>
- To: Stefan Liebler <stli at linux dot ibm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 25 Jun 2019 15:23:10 +0200
- Subject: Re: [PATCH] Fix build warnings in locale/programs/ld-ctype.c
- References: <45faf360-cad3-7c9b-a914-0823d2724b90@linux.ibm.com>
* Stefan Liebler:
> diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
> index e6105928da..cfc9c43fd5 100644
> --- a/locale/programs/ld-ctype.c
> +++ b/locale/programs/ld-ctype.c
> @@ -1396,7 +1396,8 @@ charclass_symbolic_ellipsis (struct linereader *ldfile,
> (int) (now->val.str.lenmb - (cp - last_str)),
> from);
>
> - get_character (now, charmap, repertoire, &seq, &wch);
> + if (get_character (now, charmap, repertoire, &seq, &wch))
> + goto invalid_range;
Maybe write:
if (get_character (now, charmap, repertoire, &seq, &wch) != 0)
to match the other function calls?
Otherwise, looks good.
Thanks,
Florian