LVM2/libdm/regex parse_rx.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2010-04-22 20:15:01
Modified files:
libdm/regex : parse_rx.c
Log message:
avoid ORs rightmost
libdm/regex/parse_rx.c +1 -7
@@ -421,16 +421,10 @@static unsigned _depth (struct rx_node *r,unsigned leftmost) {int count =1 ; -int or_count =0 ; -while (r->type !=CHARSET &&LEFT (r)) { +while (r->type !=CHARSET &&LEFT (r) && (leftmost || r->type !=OR )) { count++; r =LEFT (r); -/* Stop if we pass another OR */ -if (or_count) -break ; -if (r->type ==OR ) - or_count++; }return count;