From: Volker Lendecke Date: Thu, 28 Feb 2019 20:18:06 +0000 (+0100) Subject: libsmb: Use tevent_req_simple_finish_ntstatus() X-Git-Tag: talloc-2.2.0~213 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=743b922ad9626b49b2bd2a314c9ecbe56b82cf3b;p=samba.git libsmb: Use tevent_req_simple_finish_ntstatus() Less lines... Just rediscovered this function :-) Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index 795dc557c45..d5beaae9896 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -857,15 +857,8 @@ static void cli_smb2_rmdir_disp_set(struct tevent_req *subreq) static void cli_smb2_rmdir_closed(struct tevent_req *subreq) { - struct tevent_req *req = tevent_req_callback_data( - subreq, struct tevent_req); - NTSTATUS status; - - status = cli_smb2_close_fnum_recv(subreq); - if (tevent_req_nterror(req, status)) { - return; - } - tevent_req_done(req); + NTSTATUS status = cli_smb2_close_fnum_recv(subreq); + tevent_req_simple_finish_ntstatus(subreq, status); } NTSTATUS cli_smb2_rmdir_recv(struct tevent_req *req)