Mercurial > hg > octave-nkf > gnulib-hg
changeset 10079:6b412972dce7
Fix violation of <stdbool.h> replacement in regex.
* lib/regexec.c (re_search_internal): Avoid implicit cast to bool.
Reported by Heinrich Mislik <Heinrich.Mislik@univie.ac.at>.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Thu, 15 May 2008 14:51:43 -0600 |
parents | f47c913858de |
children | d0e8add2a62d |
files | ChangeLog lib/regexec.c |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Fix violation of <stdbool.h> replacement in regex. * lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool. + * lib/regexec.c (re_search_internal): Likewise. Reported by Heinrich Mislik <Heinrich.Mislik@univie.ac.at>. 2008-05-15 Jim Meyering <meyering@redhat.com>
--- a/lib/regexec.c +++ b/lib/regexec.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. @@ -701,7 +701,8 @@ fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, - preg->translate, preg->syntax & RE_ICASE, dfa); + preg->translate, (preg->syntax & RE_ICASE) != 0, + dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; @@ -3467,7 +3468,7 @@ CONTEXT_NEWLINE); if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) goto out_free; - } + } else { dest_states_word[i] = dest_states[i];