From: Volker Lendecke Date: Mon, 25 May 2020 16:29:26 +0000 (+0200) Subject: libsmb: Use tevent_req_simple_finish_ntstatus() in cli_rmdir_done() X-Git-Tag: ldb-2.2.0~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81a491dc80062dff1767fa5271da365709faba67;p=thirdparty%2Fsamba.git libsmb: Use tevent_req_simple_finish_ntstatus() in cli_rmdir_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 9eefb6fbb06..3df5d9447aa 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -2156,16 +2156,9 @@ struct tevent_req *cli_rmdir_send(TALLOC_CTX *mem_ctx, static void cli_rmdir_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_rmdir_done2(struct tevent_req *subreq)