From: Karl Williamson Date: Mon, 24 Dec 2012 02:44:03 +0000 (-0700) Subject: regcomp.c: Add comment, Note for 3018b8238 X-Git-Tag: upstream/5.20.0~4366 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff7674db17214571691c16485434c62efdfcd8d9;p=platform%2Fupstream%2Fperl.git regcomp.c: Add comment, Note for 3018b8238 This adds a comment for this code, which I mistakenly included in commit 3018b823898645e44b8c37c70ac5c6302b031381, and should have been in its own commit. The code optimizes something that has a quantifier of zero into a NOTHING node. --- diff --git a/regcomp.c b/regcomp.c index 1a746ca..c28ea5e 100644 --- a/regcomp.c +++ b/regcomp.c @@ -9402,7 +9402,7 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) ret = reg_node(pRExC_state, OPFAIL); return ret; } - else if (max == 0) { + else if (max == 0) { /* replace {0} with a nothing node */ if (SIZE_ONLY) { RExC_size = PREVOPER(RExC_size) - regarglen[(U8)NOTHING]; }