From: Volker Lendecke Date: Mon, 25 May 2020 16:29:26 +0000 (+0200) Subject: libsmb: Use tevent_req_simple_finish_ntstatus() in cli_unlink_done() X-Git-Tag: ldb-2.2.0~280 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8eb7545612377216e8265c7de6544856797bf7d;p=thirdparty%2Fsamba.git libsmb: Use tevent_req_simple_finish_ntstatus() in cli_unlink_done() Save a few lines of code Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index a6ab8f6f8c4..9c029c48d3e 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -1920,16 +1920,9 @@ struct tevent_req *cli_unlink_send(TALLOC_CTX *mem_ctx, static void cli_unlink_done(struct tevent_req *subreq) { - struct tevent_req *req = tevent_req_callback_data( - subreq, struct tevent_req); - NTSTATUS status; - - status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL); - TALLOC_FREE(subreq); - if (tevent_req_nterror(req, status)) { - return; - } - tevent_req_done(req); + NTSTATUS status = cli_smb_recv( + subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL); + tevent_req_simple_finish_ntstatus(subreq, status); } static void cli_unlink_done2(struct tevent_req *subreq)