summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-01-10 08:58:04 -0700
committerKarl Williamson <public@khwilliamson.com>2013-01-11 11:50:36 -0700
commitf673c3a062b33f383b35a7201f08bfceaf3340e6 (patch)
tree3ea2e262f6c664a4de1d421984f9ffb99acda833
parent0b50d62a8ffdccf5a54ca1421f03350fb8c62fd8 (diff)
downloadperl-f673c3a062b33f383b35a7201f08bfceaf3340e6.tar.gz
regcomp.c: Remove unnecessary variable
This variable is used just in the statement following it. Its value doesn't need to be saved, can just combine the statements
-rw-r--r--regcomp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/regcomp.c b/regcomp.c
index ea6ba26e51..e3dac83e97 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -11247,7 +11247,6 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool st
* compile time */
dVAR;
- UV nextvalue;
UV prevvalue = OOB_UNICODE, save_prevvalue = OOB_UNICODE;
IV range = 0;
UV value = OOB_UNICODE, save_value = OOB_UNICODE;
@@ -11338,10 +11337,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool st
initial_listsv_len = SvCUR(listsv);
}
- nextvalue = RExC_parse < RExC_end ? UCHARAT(RExC_parse) : 0;
/* Check that they didn't say [:posix:] instead of [[:posix:]] */
- if (!SIZE_ONLY && POSIXCC(nextvalue)) {
+ if (!SIZE_ONLY && RExC_parse < RExC_end && POSIXCC(UCHARAT(RExC_parse))) {
const char *s = RExC_parse;
const char c = *s++;
@@ -11390,9 +11388,12 @@ parseit:
else
value = UCHARAT(RExC_parse++);
- nextvalue = RExC_parse < RExC_end ? UCHARAT(RExC_parse) : 0;
- if (value == '[' && POSIXCC(nextvalue))
- namedclass = regpposixcc(pRExC_state, value, listsv);
+ if (value == '['
+ && RExC_parse < RExC_end
+ && POSIXCC(UCHARAT(RExC_parse)))
+ {
+ namedclass = regpposixcc(pRExC_state, value, listsv);
+ }
else if (value == '\\') {
if (UTF) {
value = utf8n_to_uvchr((U8*)RExC_parse,