diff options
author | Karl Berry <karl@freefriends.org> | 2019-10-12 08:11:18 -0700 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-10-12 08:11:18 -0700 |
commit | d38175bd98a69c3c6070033d70d110281267cece (patch) | |
tree | ccca9090c72700d57d4ebabc6686c7ccc088eb37 /lib | |
parent | 71f6016e89bd4d90b3954eef584fdb3ac0a94915 (diff) | |
download | gnulib-d38175bd98a69c3c6070033d70d110281267cece.tar.gz |
autoupdate
Diffstat (limited to 'lib')
-rw-r--r-- | lib/regex_internal.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/regex_internal.c b/lib/regex_internal.c index 6aa9116084..99fbb26ecb 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -212,7 +212,7 @@ build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; - DEBUG_ASSERT (MB_LEN_MAX >= pstr->mb_cur_max); + assert (MB_LEN_MAX >= pstr->mb_cur_max); #else unsigned char buf[64]; #endif @@ -285,7 +285,7 @@ build_wcs_upper_buffer (re_string_t *pstr) size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; - DEBUG_ASSERT (pstr->mb_cur_max <= MB_LEN_MAX); + assert (MB_LEN_MAX >= pstr->mb_cur_max); #else char buf[64]; #endif @@ -685,7 +685,9 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; - DEBUG_ASSERT (pstr->valid_len > 0); +#if defined DEBUG && DEBUG + assert (pstr->valid_len > 0); +#endif } } else @@ -939,7 +941,10 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags) Idx wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { - DEBUG_ASSERT (wc_idx >= 0); +#if defined DEBUG && DEBUG + /* It must not happen. */ + assert (wc_idx >= 0); +#endif --wc_idx; if (wc_idx < 0) return input->tip_context; |