libsmb: Use tevent_req_simple_finish_ntstatus()
authorVolker Lendecke <vl@samba.org>
Thu, 28 Feb 2019 20:18:06 +0000 (21:18 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 1 Mar 2019 23:58:11 +0000 (23:58 +0000)
Less lines... Just rediscovered this function :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/cli_smb2_fnum.c

index 795dc557c45821d0a2d6feb8c5781e5d01b19b8d..d5beaae98961068ceadaad44a9d296244bdee846 100644 (file)
@@ -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)