summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-01-08 22:08:40 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-01-12 19:52:19 +0100
commitee4fd13ea368e7d235e709959e5fda38ee27d0e6 (patch)
treebbe090d9b42e4284328d8825ea86153574078522 /source4/lib/ldb
parenta26a48934df146bbd1fe48dabdad1656cca8713a (diff)
downloadsamba-ee4fd13ea368e7d235e709959e5fda38ee27d0e6.tar.gz
samba-ee4fd13ea368e7d235e709959e5fda38ee27d0e6.tar.bz2
samba-ee4fd13ea368e7d235e709959e5fda38ee27d0e6.zip
ldb:ldbsearch.c - fix possible uninitialised variable
And add a comparison for the "ret" result - this is more standard-oriented
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/tools/ldbsearch.c4
1 files 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);
}