From ee4fd13ea368e7d235e709959e5fda38ee27d0e6 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 8 Jan 2011 22:08:40 +0100 Subject: ldb:ldbsearch.c - fix possible uninitialised variable And add a comparison for the "ret" result - this is more standard-oriented --- source4/lib/ldb/tools/ldbsearch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c index 6059ac6c50..28ec743bcb 100644 --- a/source4/lib/ldb/tools/ldbsearch.c +++ b/source4/lib/ldb/tools/ldbsearch.c @@ -133,7 +133,7 @@ static int display_referral(char *referral, struct search_context *sctx) static int search_callback(struct ldb_request *req, struct ldb_reply *ares) { struct search_context *sctx; - int ret; + int ret = LDB_SUCCESS; sctx = talloc_get_type(req->context, struct search_context); @@ -174,7 +174,7 @@ static int search_callback(struct ldb_request *req, struct ldb_reply *ares) } talloc_free(ares); - if (ret) { + if (ret != LDB_SUCCESS) { return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR); } -- cgit