From faed8175063b16df94d5332581baf1af0562bb09 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 13 Aug 2006 07:33:57 +0000 Subject: r17514: Simplify the way to set ldb errors and add another helper function to set them. (This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df) --- source4/lib/ldb/modules/sort.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/lib/ldb/modules/sort.c') diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c index 1ab034f4fb..0ae16d08ab 100644 --- a/source4/lib/ldb/modules/sort.c +++ b/source4/lib/ldb/modules/sort.c @@ -72,7 +72,7 @@ static struct ldb_handle *init_handle(void *mem_ctx, struct ldb_module *module, h = talloc_zero(mem_ctx, struct ldb_handle); if (h == NULL) { - ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory")); + ldb_set_errstring(module->ldb, "Out of Memory"); return NULL; } @@ -80,7 +80,7 @@ static struct ldb_handle *init_handle(void *mem_ctx, struct ldb_module *module, ac = talloc_zero(h, struct sort_context); if (ac == NULL) { - ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory")); + ldb_set_errstring(module->ldb, "Out of Memory"); talloc_free(h); return NULL; } @@ -171,7 +171,7 @@ static int server_sort_search_callback(struct ldb_context *ldb, void *context, s struct sort_context *ac = NULL; if (!context || !ares) { - ldb_set_errstring(ldb, talloc_asprintf(ldb, "NULL Context or Result in callback")); + ldb_set_errstring(ldb, "NULL Context or Result in callback"); goto error; } @@ -245,7 +245,8 @@ static int server_sort_search(struct ldb_module *module, struct ldb_request *req req->handle = NULL; if (!req->callback || !req->context) { - ldb_set_errstring(module->ldb, talloc_asprintf(module, "Async interface called with NULL callback function or NULL context")); + ldb_set_errstring(module->ldb, + "Async interface called with NULL callback function or NULL context"); return LDB_ERR_OPERATIONS_ERROR; } -- cgit