summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-01-18 16:30:39 +0100
committerNicholas Clark <nick@ccl4.org>2013-03-19 11:53:19 +0100
commit5c9bea1dbbeef502005513dbe1d6e3942dfd3f27 (patch)
tree372f2d62b20de22a2f19004ec42e391aae781247 /regcomp.c
parente22f9b1c6a54c0d78a629d4d4160914b2a563855 (diff)
downloadperl-5c9bea1dbbeef502005513dbe1d6e3942dfd3f27.tar.gz
Return orig_emit from S_regclass() when ret_invlist is true.
The return value isn't used (yet). Previously the code was returning END, which is a macro for the regnode number for "End of program" which happens to be 0. It happens that 0 is valid C for a NULL pointer, but using it in this way makes the intent unclear. Not only is orig_emit a valid type, it's semantically the correct thing to return, as it's most recently added node.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 6c677f53c4..160a3371e9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -13518,7 +13518,7 @@ parseit:
else {
RExC_emit = orig_emit;
}
- return END;
+ return orig_emit;
}
/* If we didn't do folding, it's because some information isn't available