From 52bef30fd48393fa7b24ade7622c758373bd6dbe Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 13 Jul 2005 05:55:28 +0000 Subject: r8414: Some C++ friendlyness fixes - 'not' is apparently a keyword in C++. (This used to be commit bcfb3a45e4a5962fe763f8071d4458f4bd11605b) --- source4/lib/ldb/common/ldb_match.c | 2 +- source4/lib/ldb/common/ldb_parse.c | 6 +++--- source4/lib/ldb/include/ldb.h | 2 +- source4/libcli/ldap/ldap.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source4/lib/ldb/common/ldb_match.c b/source4/lib/ldb/common/ldb_match.c index b32a933df3..f437f31eac 100644 --- a/source4/lib/ldb/common/ldb_match.c +++ b/source4/lib/ldb/common/ldb_match.c @@ -369,7 +369,7 @@ static int ldb_match_message(struct ldb_context *ldb, return ldb_match_extended(ldb, msg, tree, base, scope); case LDB_OP_NOT: - return ! ldb_match_message(ldb, msg, tree->u.not.child, base, scope); + return ! ldb_match_message(ldb, msg, tree->u.isnot.child, base, scope); case LDB_OP_AND: for (i=0;iu.list.num_elements;i++) { diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c index ad3cbd883d..933ff18f2b 100644 --- a/source4/lib/ldb/common/ldb_parse.c +++ b/source4/lib/ldb/common/ldb_parse.c @@ -459,8 +459,8 @@ static struct ldb_parse_tree *ldb_parse_not(void *mem_ctx, const char *s) } ret->operation = LDB_OP_NOT; - ret->u.not.child = ldb_parse_filter(ret, &s); - if (!ret->u.not.child) { + ret->u.isnot.child = ldb_parse_filter(ret, &s); + if (!ret->u.isnot.child) { talloc_free(ret); return NULL; } @@ -629,7 +629,7 @@ char *ldb_filter_from_tree(void *mem_ctx, struct ldb_parse_tree *tree) } return s; case LDB_OP_NOT: - s = ldb_filter_from_tree(mem_ctx, tree->u.not.child); + s = ldb_filter_from_tree(mem_ctx, tree->u.isnot.child); if (s == NULL) return NULL; ret = talloc_asprintf(mem_ctx, "(!%s)", s); diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index 8233e78f0e..c2d7b0d614 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -186,7 +186,7 @@ struct ldb_parse_tree { } list; struct { struct ldb_parse_tree *child; - } not; + } isnot; } u; }; diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c index d7a230a77f..5a45e6524e 100644 --- a/source4/libcli/ldap/ldap.c +++ b/source4/libcli/ldap/ldap.c @@ -97,7 +97,7 @@ static BOOL ldap_push_filter(struct asn1_data *data, struct ldb_parse_tree *tree case LDB_OP_NOT: asn1_push_tag(data, ASN1_CONTEXT(2)); - if (!ldap_push_filter(data, tree->u.not.child)) { + if (!ldap_push_filter(data, tree->u.isnot.child)) { return False; } asn1_pop_tag(data); @@ -500,8 +500,8 @@ static struct ldb_parse_tree *ldap_decode_filter_tree(TALLOC_CTX *mem_ctx, } ret->operation = LDB_OP_NOT; - ret->u.not.child = ldap_decode_filter_tree(ret, data); - if (ret->u.not.child == NULL) { + ret->u.isnot.child = ldap_decode_filter_tree(ret, data); + if (ret->u.isnot.child == NULL) { goto failed; } if (!asn1_end_tag(data)) { -- cgit