From 3fb4a5209bcb5eb21b423c74790023a25b6995ad Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Mon, 25 Mar 2019 13:07:50 +0900 Subject: [PATCH] refactoring for escape warnings of LGTM --- src/regcomp.c | 4 ++-- src/regexec.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/regcomp.c b/src/regcomp.c index e73ad7c..f2f0f78 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -6246,12 +6246,12 @@ onig_free(regex_t* reg) static void print_tree P_((FILE* f, Node* node)); #endif +extern int onig_init_for_match_at(regex_t* reg); + extern int onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo) { - extern int onig_init_for_match_at(regex_t* reg); - int r; Node* root; ScanEnv scan_env; diff --git a/src/regexec.c b/src/regexec.c index 2863faa..ae6ae4c 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -3610,9 +3610,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, mems = tlen == 1 ? &(p->backref_general.n1) : p->backref_general.ns; if (backref_check_at_nested_level(reg, stk, stk_base, - (int )level, (int )tlen, mems) != 0) { - } - else + (int )level, (int )tlen, mems) == 0) goto fail; } INC_OP; -- 2.40.0