From: Karl Williamson Date: Thu, 2 Mar 2017 04:52:22 +0000 (-0700) Subject: regcomp.c: Simplify expression X-Git-Tag: v5.27.1~149 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/73157762e2382837c0c047c77aca4bb0f5377216 regcomp.c: Simplify expression Here, there is no advantage to assigning a variable within an 'if', and it is somewhat harder to read, so don't do it. --- diff --git a/regcomp.c b/regcomp.c index 6fc3716..97c5949 100644 --- a/regcomp.c +++ b/regcomp.c @@ -12017,7 +12017,8 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, RExC_parse++; /* Skip past the '{' */ - if (! (endbrace = strchr(RExC_parse, '}'))) { /* no trailing brace */ + endbrace = strchr(RExC_parse, '}'); + if (! endbrace) { /* no trailing brace */ vFAIL2("Missing right brace on \\%c{}", 'N'); } else if(!(endbrace == RExC_parse /* nothing between the {} */