dovecot: Merge also unnecessary sub-ORs.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 23 14:22:11 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/33480577814e
changeset: 6486:33480577814e
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 23 14:21:53 2007 +0300
description:
Merge also unnecessary sub-ORs.
diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
src/lib-storage/index/index-search.c | 6 ++++--
diffs (16 lines):
diff -r 2eff72b212fe -r 33480577814e src/lib-storage/index/index-search.c
--- a/src/lib-storage/index/index-search.c Sun Sep 23 14:16:10 2007 +0300
+++ b/src/lib-storage/index/index-search.c Sun Sep 23 14:21:53 2007 +0300
@@ -823,8 +823,10 @@ static void search_args_fix_subs(struct
sub->not = !sub->not;
}
- if (args->type == SEARCH_SUB && parent_and) {
- /* p and (q and ..) == p and q and .. */
+ if ((args->type == SEARCH_SUB && parent_and) ||
+ (args->type == SEARCH_OR && !parent_and)) {
+ /* p and (q and ..) == p and q and ..
+ p or (q or ..) == p or q or .. */
sub = args->value.subargs;
for (; sub->next != NULL; sub = sub->next) ;
sub->next = args->next;
More information about the dovecot-cvs
mailing list