mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Simplify test in re_string_skip_chars.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2010-01-22 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* posix/regex_internal.c (re_string_skip_chars): Simplify test for
|
||||||
|
failed mbrtowc call.
|
||||||
|
|
||||||
2010-01-22 Jim Meyering <jim@meyering.net>
|
2010-01-22 Jim Meyering <jim@meyering.net>
|
||||||
|
|
||||||
[BZ #11186]
|
[BZ #11186]
|
||||||
|
@ -500,7 +500,7 @@ re_string_skip_chars (re_string_t *pstr, int new_raw_idx, wint_t *last_wc)
|
|||||||
prev_st = pstr->cur_state;
|
prev_st = pstr->cur_state;
|
||||||
mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
|
mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
|
||||||
remain_len, &pstr->cur_state);
|
remain_len, &pstr->cur_state);
|
||||||
if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
|
if (BE ((ssize_t) mbclen <= 0, 0))
|
||||||
{
|
{
|
||||||
/* We treat these cases as a single byte character. */
|
/* We treat these cases as a single byte character. */
|
||||||
if (mbclen == 0 || remain_len == 0)
|
if (mbclen == 0 || remain_len == 0)
|
||||||
|
Reference in New Issue
Block a user