summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-09-21 12:38:46 +0200
committerAndrew Tridgell <tridge@samba.org>2011-10-11 08:42:07 +0200
commit500d1ba546ff3a677f0a48edc233daeed4d1fe41 (patch)
tree318caa1a1abf113de3e33f67c36ce961bab87a67
parent8cab94e827df1ecbb03cd91467be41feece8c6e5 (diff)
downloadsamba-500d1ba546ff3a677f0a48edc233daeed4d1fe41.tar.gz
samba-500d1ba546ff3a677f0a48edc233daeed4d1fe41.tar.bz2
samba-500d1ba546ff3a677f0a48edc233daeed4d1fe41.zip
ldb:ldb.c/"ldb_wait" - change "ldb_wait" slightly in order to introduce error messages
In this occasion remove a redundant check for "LDB_ASYNC_DONE": if (handle->state == LDB_ASYNC_DONE || if (handle->state == LDB_ASYNC_DONE) handle->status != LDB_SUCCESS) { return handle->status; return handle->status; == if (handle->status != LDB_SUCCESS) } return handle->status; ... ... return LDB_SUCCESS; return LDB_SUCCESS; Signed-off-by: Andrew Tridgell <tridge@samba.org>
-rw-r--r--lib/ldb/common/ldb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c
index 0c5f40ae4b..d753bf7bd2 100644
--- a/lib/ldb/common/ldb.c
+++ b/lib/ldb/common/ldb.c
@@ -596,8 +596,7 @@ int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type)
if (ret != 0) {
return LDB_ERR_OPERATIONS_ERROR;
}
- if (handle->state == LDB_ASYNC_DONE ||
- handle->status != LDB_SUCCESS) {
+ if (handle->status != LDB_SUCCESS) {
return handle->status;
}
break;
@@ -612,7 +611,10 @@ int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type)
return handle->status;
}
}
- return handle->status;
+ if (handle->status != LDB_SUCCESS) {
+ return handle->status;
+ }
+ break;
}
return LDB_SUCCESS;