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>
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;
return handle->status;
}
}
- return handle->status;
+ if (handle->status != LDB_SUCCESS) {
+ return handle->status;
+ }
+ break;
}
return LDB_SUCCESS;