From: Eric Blake Date: Thu, 15 May 2008 20:37:29 +0000 (-0600) Subject: Fix violation of replacement in regex. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39fc05fb065833938aad7ab0285f017e616a60f2;p=pspp Fix violation of replacement in regex. * lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool. Reported by Heinrich Mislik . Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 2e4d587237..04ee46e7f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-15 Eric Blake + + Fix violation of replacement in regex. + * lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool. + Reported by Heinrich Mislik . + 2008-05-15 Jim Meyering avoid distracting test output when git or cvs is not fount @@ -69,7 +75,7 @@ * lib/xmalloc.c (xmemdup0): Likewise. 2008-05-13 Eric Blake - Bruno Haible + Bruno Haible Reduce number of forks required during autoconf. * gnulib-tool (func_emit_initmacro_start): Prepare gl_LIBSOURCES_LIST diff --git a/lib/regcomp.c b/lib/regcomp.c index dc15666503..a3a745db86 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. + 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 . @@ -776,7 +776,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length, __libc_lock_init (dfa->lock); err = re_string_construct (®exp, pattern, length, preg->translate, - syntax & RE_ICASE, dfa); + (syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: