From 743b922ad9626b49b2bd2a314c9ecbe56b82cf3b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 28 Feb 2019 21:18:06 +0100 Subject: [PATCH] libsmb: Use tevent_req_simple_finish_ntstatus() Less lines... Just rediscovered this function :-) Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/libsmb/cli_smb2_fnum.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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) -- 2.34.1