]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Use tevent_req_simple_finish_ntstatus() in cli_rmdir_done()
authorVolker Lendecke <vl@samba.org>
Mon, 25 May 2020 16:29:26 +0000 (18:29 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 28 May 2020 19:11:39 +0000 (19:11 +0000)
Save a few lines of code

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

index 9eefb6fbb0673c7245df12b8a545e94245ebf0e1..3df5d9447aa3728c184746642e571fc2ab204e62 100644 (file)
@@ -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)