From: agk@sourceware.org <agk@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/libdm/regex matcher.c parse_rx.c parse_rx.h
Date: 22 Apr 2010 23:09:22 -0000 [thread overview]
Message-ID: <20100422230922.27702.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2010-04-22 23:09:20
Modified files:
libdm/regex : matcher.c parse_rx.c parse_rx.h
Log message:
don't optimise anything with TARGET_TRANS to avoid intefering with the matcher's counting
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/regex/matcher.c.diff?cvsroot=lvm2&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/regex/parse_rx.c.diff?cvsroot=lvm2&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/regex/parse_rx.h.diff?cvsroot=lvm2&r1=1.2&r2=1.3
--- LVM2/libdm/regex/matcher.c 2010/04/22 20:35:24 1.5
+++ LVM2/libdm/regex/matcher.c 2010/04/22 23:09:18 1.6
@@ -37,8 +37,6 @@
struct dm_pool *scratch, *mem;
};
-#define TARGET_TRANS '\0'
-
static int _count_nodes(struct rx_node *rx)
{
int r = 1;
--- LVM2/libdm/regex/parse_rx.c 2010/04/22 20:15:00 1.10
+++ LVM2/libdm/regex/parse_rx.c 2010/04/22 23:09:18 1.11
@@ -452,7 +452,12 @@
return _nodes_equal(l->left, r->left);
case CHARSET:
- return dm_bitset_equal(l->charset, r->charset);
+ /*
+ * Never change anything containing TARGET_TRANS
+ * used by matcher as boundary marker between concatenated
+ * expressions.
+ */
+ return (!dm_bit(l->charset, TARGET_TRANS) && dm_bitset_equal(l->charset, r->charset));
}
/* NOTREACHED */
--- LVM2/libdm/regex/parse_rx.h 2007/08/21 16:26:07 1.2
+++ LVM2/libdm/regex/parse_rx.h 2010/04/22 23:09:18 1.3
@@ -33,6 +33,8 @@
#define HAT_CHAR 0x2
#define DOLLAR_CHAR 0x3
+#define TARGET_TRANS '\0'
+
struct rx_node {
int type;
dm_bitset_t charset;
next reply other threads:[~2010-04-22 23:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 23:09 agk [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-07-21 11:58 LVM2/libdm/regex matcher.c parse_rx.c parse_rx.h thornber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100422230922.27702.qmail@sourceware.org \
--to=agk@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.