summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-04-02 11:17:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:43 -0500
commitf53e12b41b8d669c175536449fc676389cc3dd57 (patch)
tree68e2cb01a3f742c2360e7d6d382405a883cd5f09
parent9424766ee0eb632f877e70e1d251f6cdbf659fad (diff)
downloadsamba-f53e12b41b8d669c175536449fc676389cc3dd57.tar.gz
samba-f53e12b41b8d669c175536449fc676389cc3dd57.tar.xz
samba-f53e12b41b8d669c175536449fc676389cc3dd57.zip
r14857: fix bugs noticed by the ibm code checker
metze (This used to be commit 07626bf3c7dc7162b852cc27e5a7c313ede3862a)
-rw-r--r--source4/ldap_server/ldap_backend.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index b9f002f157b..1b5bc9fe8bf 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -123,8 +123,8 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
const char **attrs = NULL;
const char *errstr = NULL;
int success_limit = 1;
- int result = LDAP_SUCCESS;
- int ldb_ret;
+ int result = -1;
+ int ldb_ret = -1;
int i, j;
DEBUG(10, ("SearchRequest"));
@@ -227,7 +227,8 @@ reply:
done->dn = NULL;
done->referral = NULL;
- if (ldb_ret == LDB_SUCCESS) {
+ if (result != -1) {
+ } else if (ldb_ret == LDB_SUCCESS) {
if (res->count >= success_limit) {
DEBUG(10,("SearchRequest: results: [%d]\n", res->count));
result = LDAP_SUCCESS;