diff options
author | Karl Williamson <khw@cpan.org> | 2021-01-14 04:52:10 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-01-20 06:51:49 -0700 |
commit | 80318d2b040211edc9d94d10bc5d79497be66324 (patch) | |
tree | b1e7508a939849cf3bc393b24e0156fe03188cb0 | |
parent | e8ba086966639eb1fc2185bfc1b5026ad30cfdd7 (diff) | |
download | perl-80318d2b040211edc9d94d10bc5d79497be66324.tar.gz |
regcomp.c: Move initialization into declaration
This is considered better practice.
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -13725,9 +13725,9 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) else { STRLEN length; char name = *RExC_parse; - char * endbrace = NULL; + char * endbrace = (char *) memchr(RExC_parse, '}', + RExC_end - RExC_parse); RExC_parse += 2; - endbrace = (char *) memchr(RExC_parse, '}', RExC_end - RExC_parse); if (! endbrace) { vFAIL2("Missing right brace on \\%c{}", name); |