diff options
author | David Mitchell <davem@iabyn.com> | 2013-07-31 10:08:18 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2013-07-31 10:08:18 +0100 |
commit | adf51885e3854cd61753c6737ae2e11882559838 (patch) | |
tree | e9e12353e0cb8113b59b682b8a9d454a85646b25 /pp_hot.c | |
parent | 9a743a6d839e1f1163fcb6ecaf00d8eba7d8ffbf (diff) | |
download | perl-adf51885e3854cd61753c6737ae2e11882559838.tar.gz |
pp_match(): remove redundant condition
a successful match always sets $-[0] now, so there's no need to check
whether its set
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -1447,14 +1447,11 @@ PP(pp_match) if (!mg) { mg = sv_magicext_mglob(TARG); } - assert(RX_OFFS(rx)[0].start != -1); /* XXX get rid of next line? */ - if (RX_OFFS(rx)[0].start != -1) { - mg->mg_len = RX_OFFS(rx)[0].end; - if (RX_ZERO_LEN(rx)) - mg->mg_flags |= MGf_MINMATCH; - else - mg->mg_flags &= ~MGf_MINMATCH; - } + mg->mg_len = RX_OFFS(rx)[0].end; + if (RX_ZERO_LEN(rx)) + mg->mg_flags |= MGf_MINMATCH; + else + mg->mg_flags &= ~MGf_MINMATCH; } if ((!RX_NPARENS(rx) && !global) || gimme != G_ARRAY) { |