mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +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;
|
struct dfa_state *ns;
|
||||||
|
|
||||||
if (!cs->lookup[(unsigned char) c])
|
if (!(ns = cs->lookup[(unsigned char) c])) {
|
||||||
_calc_state(m, cs, (unsigned char) c);
|
_calc_state(m, cs, (unsigned char) c);
|
||||||
|
if (!(ns = cs->lookup[(unsigned char) c]))
|
||||||
if (!(ns = cs->lookup[(unsigned char) c]))
|
return NULL;
|
||||||
return NULL;
|
}
|
||||||
|
|
||||||
// yuck, we have to special case the target trans
|
// yuck, we have to special case the target trans
|
||||||
if (ns->final == -1)
|
if (ns->final == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user