From f38557dc50c8e7184c4e8530c0a8effb217e8fc0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Fri, 4 May 2012 11:41:03 +0200 Subject: [PATCH] LDB:ldif_handlers.c - LDB_OP_GREATER/LDB_OP_LESS are thought as ">=" or "<=" --- lib/ldb-samba/ldif_handlers.c | 4 ++-- lib/ldb/common/ldb_parse.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ldb-samba/ldif_handlers.c b/lib/ldb-samba/ldif_handlers.c index af66623efa..1cf7df76ff 100644 --- a/lib/ldb-samba/ldif_handlers.c +++ b/lib/ldb-samba/ldif_handlers.c @@ -1139,9 +1139,9 @@ static int samba_syntax_operator_fn(struct ldb_context *ldb, enum ldb_parse_op o ret = a->syntax->comparison_fn(ldb, tmp_ctx, v1, v2); talloc_free(tmp_ctx); if (operation == LDB_OP_GREATER) { - *matched = (ret > 0); + *matched = (ret >= 0); } else if (operation == LDB_OP_LESS) { - *matched = (ret < 0); + *matched = (ret <= 0); } else { *matched = (ret == 0); } diff --git a/lib/ldb/common/ldb_parse.c b/lib/ldb/common/ldb_parse.c index 47145a2301..cfa2959194 100644 --- a/lib/ldb/common/ldb_parse.c +++ b/lib/ldb/common/ldb_parse.c @@ -343,7 +343,7 @@ static enum ldb_parse_op ldb_parse_filtertype(TALLOC_CTX *mem_ctx, char **type, } if (!filter) { talloc_free(name); - return filter; + return 0; } p++; -- 2.34.1