regcomp.c: Avoid recalculating a value
authorKarl Williamson <public@khwilliamson.com>
Wed, 9 Jan 2013 04:06:54 +0000 (21:06 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 9 Jan 2013 04:44:26 +0000 (21:44 -0700)
This value was calculated and saved in 'len' a couple of lines above.

regcomp.c

index 75bb6a2..f50bd90 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -7906,7 +7906,7 @@ Perl__add_range_to_invlist(pTHX_ SV* invlist, const UV start, const UV end)
     /* If comes after the final entry, can just append it to the end */
     if (len == 0
        || start >= invlist_array(invlist)
-                                   [_invlist_len(invlist) - 1])
+                                   [len - 1])
     {
        _append_range_to_invlist(invlist, start, end);
        return invlist;