From: Volker Lendecke Date: Fri, 6 Aug 2021 12:16:22 +0000 (+0200) Subject: rpc_client: Simplify rpc_api_pipe_auth3_done() X-Git-Tag: ldb-2.5.0~858 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8c828b87ddaf8af245e6671590cfc8ef8ed9ee2;p=thirdparty%2Fsamba.git rpc_client: Simplify rpc_api_pipe_auth3_done() Use tevent_req_simple_finish_ntstatus() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index d1a535beca0..193a99cb6ee 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -846,19 +846,8 @@ static struct tevent_req *rpc_api_pipe_send(TALLOC_CTX *mem_ctx, static void rpc_api_pipe_auth3_done(struct tevent_req *subreq) { - struct tevent_req *req = - tevent_req_callback_data(subreq, - struct tevent_req); - NTSTATUS status; - - status = rpc_write_recv(subreq); - TALLOC_FREE(subreq); - if (!NT_STATUS_IS_OK(status)) { - tevent_req_nterror(req, status); - return; - } - - tevent_req_done(req); + NTSTATUS status = rpc_write_recv(subreq); + return tevent_req_simple_finish_ntstatus(subreq, status); } static void rpc_api_pipe_trans_done(struct tevent_req *subreq)