From df9d46a353da15f68d299498f36ab0474c8e1e5a Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 7 Apr 2011 10:11:46 +0200 Subject: ldb:ldb_msg_check_sanity - clean it up from unneeded stuff --- source4/lib/ldb/common/ldb_msg.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4') diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c index d1c77f89bc..8060476d7d 100644 --- a/source4/lib/ldb/common/ldb_msg.c +++ b/source4/lib/ldb/common/ldb_msg.c @@ -772,7 +772,6 @@ int ldb_msg_sanity_check(struct ldb_context *ldb, /* basic check on DN */ if (msg->dn == NULL) { - /* TODO: return also an error string */ ldb_set_errstring(ldb, "ldb message lacks a DN!"); return LDB_ERR_INVALID_DN_SYNTAX; } @@ -781,13 +780,10 @@ int ldb_msg_sanity_check(struct ldb_context *ldb, for (i = 0; i < msg->num_elements; i++) { for (j = 0; j < msg->elements[i].num_values; j++) { if (msg->elements[i].values[j].length == 0) { - TALLOC_CTX *mem_ctx = talloc_new(ldb); /* an attribute cannot be empty */ - /* TODO: return also an error string */ ldb_asprintf_errstring(ldb, "Element %s has empty attribute in ldb message (%s)!", msg->elements[i].name, ldb_dn_get_linearized(msg->dn)); - talloc_free(mem_ctx); return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; } } -- cgit