mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-11 09:18:25 +03:00
Optimize lookup table read
Reread lookup table only when needed.
This commit is contained in:
parent
56c7200837
commit
e0a4b67e11
@ -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