From d7de3fa799fa64a3463765b3f6159fccda581b0c Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Tue, 16 Mar 2010 09:48:58 +0100 Subject: s4:dsdb - fix up warnings --- source4/dsdb/samdb/ldb_modules/linked_attributes.c | 2 +- source4/dsdb/samdb/ldb_modules/resolve_oids.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c index 1e0a2b05f3..56ed447771 100644 --- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c +++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c @@ -163,7 +163,7 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques schema = dsdb_get_schema(ldb, res); if (!schema) { - ldb_oom(schema); + ldb_oom(ldb); return LDB_ERR_OPERATIONS_ERROR; } diff --git a/source4/dsdb/samdb/ldb_modules/resolve_oids.c b/source4/dsdb/samdb/ldb_modules/resolve_oids.c index aab997d996..9928945375 100644 --- a/source4/dsdb/samdb/ldb_modules/resolve_oids.c +++ b/source4/dsdb/samdb/ldb_modules/resolve_oids.c @@ -521,7 +521,10 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re return LDB_ERR_OPERATIONS_ERROR; } - talloc_reference(tree, schema); + if (talloc_reference(tree, schema) == NULL) { + ldb_oom(ldb); + return LDB_ERR_OPERATIONS_ERROR; + } ret = resolve_oids_parse_tree_replace(ldb, schema, tree); @@ -529,7 +532,8 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re return ret; } - attrs2 = str_list_copy_const(ac, req->op.search.attrs); + attrs2 = str_list_copy_const(ac, + discard_const_p(const char *, req->op.search.attrs)); if (req->op.search.attrs && !attrs2) { ldb_oom(ldb); return LDB_ERR_OPERATIONS_ERROR; @@ -537,7 +541,7 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re for (i=0; attrs2 && attrs2[i]; i++) { const char *p; - struct dsdb_attribute *a; + const struct dsdb_attribute *a; p = strchr(attrs2[i], '.'); if (p == NULL) { -- cgit