Skip to content

Commit

Permalink
pp_match(): remove redundant condition
Browse files Browse the repository at this point in the history
a successful match always sets $-[0] now, so there's no need to check
whether its set
  • Loading branch information
iabyn committed Jul 31, 2013
1 parent 9a743a6 commit adf5188
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions pp_hot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit adf5188

Please sign in to comment.