summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules/asq.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-08-13 07:33:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:31 -0500
commitfaed8175063b16df94d5332581baf1af0562bb09 (patch)
treeeb7c5b5fee25bf0e004f76ba40dad3785ef3ef9f /source4/lib/ldb/modules/asq.c
parenta9ad616a6820cb98f85e2543f65a2b711e080da7 (diff)
downloadsamba-faed8175063b16df94d5332581baf1af0562bb09.tar.gz
samba-faed8175063b16df94d5332581baf1af0562bb09.tar.bz2
samba-faed8175063b16df94d5332581baf1af0562bb09.zip
r17514: Simplify the way to set ldb errors and add another
helper function to set them. (This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
Diffstat (limited to 'source4/lib/ldb/modules/asq.c')
-rw-r--r--source4/lib/ldb/modules/asq.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/ldb/modules/asq.c b/source4/lib/ldb/modules/asq.c
index 110470c8bb..1185cd8dac 100644
--- a/source4/lib/ldb/modules/asq.c
+++ b/source4/lib/ldb/modules/asq.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 asq_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;
}
@@ -154,7 +154,7 @@ static int asq_base_callback(struct ldb_context *ldb, void *context, struct ldb_
struct asq_context *ac;
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;
}
@@ -178,7 +178,7 @@ static int asq_reqs_callback(struct ldb_context *ldb, void *context, struct ldb_
struct asq_context *ac;
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;
}
@@ -220,8 +220,8 @@ static int asq_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;
}