diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-14 08:18:42 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-14 12:13:28 -0800 |
commit | ae9780c06b7fdb1aff52712f57b4571f23dfa743 (patch) | |
tree | f985d624b1fd4bc9f81c8377f73a389b2737b19b /src/pcresearch.c | |
parent | 50d5fbb7c3b0cc9e44c7166a75248877a8580b37 (diff) | |
download | grep-ae9780c06b7fdb1aff52712f57b4571f23dfa743.tar.gz |
grep: simplify JIT setup
* src/pcresearch.c (Pcompile): Simplify since ‘die’ cannot return.
Diffstat (limited to 'src/pcresearch.c')
-rw-r--r-- | src/pcresearch.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/pcresearch.c b/src/pcresearch.c index 6e1f2176..9898e046 100644 --- a/src/pcresearch.c +++ b/src/pcresearch.c @@ -196,11 +196,9 @@ Pcompile (char *pattern, idx_t size, reg_syntax_t ignored, bool exact) ec = pcre2_jit_compile (pc->cre, PCRE2_JIT_COMPLETE); if (ec && ec != PCRE2_ERROR_JIT_BADOPTION && ec != PCRE2_ERROR_NOMEMORY) die (EXIT_TROUBLE, 0, _("JIT internal error: %d"), ec); - else - { - /* The PCRE documentation says that a 32 KiB stack is the default. */ - pc->jit_stack_size = 32 << 10; - } + + /* The PCRE documentation says that a 32 KiB stack is the default. */ + pc->jit_stack_size = 32 << 10; pc->empty_match[false] = jit_exec (pc, "", 0, 0, PCRE2_NOTBOL); pc->empty_match[true] = jit_exec (pc, "", 0, 0, 0); |