mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Optimize lookup table read
Reread lookup table only when needed.
This commit is contained in:
parent
b20e74d5d6
commit
2e3be4f3fd
@ -372,11 +372,11 @@ static struct dfa_state *_step_matcher(struct dm_regex *m, int c, struct dfa_sta
|
||||
{
|
||||
struct dfa_state *ns;
|
||||
|
||||
if (!cs->lookup[(unsigned char) c])
|
||||
_calc_state(m, cs, (unsigned char) c);
|
||||
|
||||
if (!(ns = cs->lookup[(unsigned char) c]))
|
||||
return NULL;
|
||||
if (!(ns = cs->lookup[(unsigned char) c])) {
|
||||
_calc_state(m, cs, (unsigned char) c);
|
||||
if (!(ns = cs->lookup[(unsigned char) c]))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// yuck, we have to special case the target trans
|
||||
if (ns->final == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user