From c11ea452b0ba48a47926d844e1ee7d06a64e2354 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 14 Nov 2021 08:18:42 -0800 Subject: [PATCH 08/12] grep: simplify JIT setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/pcresearch.c (Pcompile): Simplify since ‘die’ cannot return. --- src/pcresearch.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pcresearch.c b/src/pcresearch.c index 6e1f217..9898e04 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); -- 2.32.0