changeset 39496:dfd69627235c

autoupdate
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 10 Aug 2018 14:28:55 -0700
parents 000739ee1056
children 376d06f8f917
files lib/regcomp.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lib/regcomp.c	Wed Aug 08 10:06:37 2018 -0700
+++ b/lib/regcomp.c	Fri Aug 10 14:28:55 2018 -0700
@@ -2684,15 +2684,14 @@
 
 # ifdef RE_ENABLE_I18N
 /* Convert the byte B to the corresponding wide character.  In a
-   unibyte locale, treat B as itself if it is an encoding error.
-   In a multibyte locale, return WEOF if B is an encoding error.  */
+   unibyte locale, treat B as itself.  In a multibyte locale, return
+   WEOF if B is an encoding error.  */
 static wint_t
 parse_byte (unsigned char b, re_charset_t *mbcset)
 {
-  wint_t wc = __btowc (b);
-  return wc == WEOF && !mbcset ? b : wc;
+  return mbcset == NULL ? b : __btowc (b);
 }
-#endif
+# endif
 
   /* Local function for parse_bracket_exp only used in case of NOT _LIBC.
      Build the range expression which starts from START_ELEM, and ends