LVM2/libdm/regex matcher.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-11-29 14:25:14
Modified files:
libdm/regex : matcher.c
Log message:
Optimize lookup table read
Reread lookup table only when needed.
libdm/regex/matcher.c +5 -5
@@ -372,11 +372,11 @@ {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 )