re_intuit_start(): de-duplicate condition
authorDavid Mitchell <davem@iabyn.com>
Mon, 17 Feb 2014 20:46:15 +0000 (20:46 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 16 Mar 2014 18:03:49 +0000 (18:03 +0000)
commit97136c8a5affa3c46e244cc603af319eafb3938b
tree44455cb698316ac9d16b3b48c398d0ac5442202e
parent3369914b87d2d563caa427611eb6e81820d8796a
re_intuit_start(): de-duplicate condition

Change

    if (have_anchored && check_ix == 1) {
        B;
    }

    if (!have_anchored) {
        A;
    }

    C;

To:

    if (have_anchored) {
        if (check_ix == 1) {
            B;
        }
    }
    else {
        A;
    }

    C;

This change should be functionally equivalent, but eliminates calculating
the have_anchored condition twice.
regexec.c