Initialise other_last to strpos at the top if the function, rather than
initialising it to NULL then later setting it to strpos if NULL.
Makes the code simpler.
Although strpos can currently change doing execution, the conditional
assignment always happens before strpos has had a chance to change.
const bool utf8_target = (sv && SvUTF8(sv)) ? 1 : 0; /* if no sv we have to assume bytes */
U8 other_ix = 1 - prog->substrs->check_ix;
bool ml_anch = 0;
- char *other_last = NULL; /* latest pos 'other' substr already checked to */
+ char *other_last = strpos;/* latest pos 'other' substr already checked to */
char *check_at = NULL; /* check substr found at this pos */
char *checked_upto = NULL; /* how far into the string we have already checked using find_byclass*/
const I32 multiline = prog->extflags & RXf_PMf_MULTILINE;
: prog->substrs->data[other_ix].substr)
{
/* Take into account the "other" substring. */
- if (!other_last)
- other_last = strpos;
-
do_other_substr:
{
char *last, *last1;