]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Use tevent_req_simple_finish_ntstatus() in cli_unlink_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:38 +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 a6ab8f6f8c4491b4eff16a286f320f691ff87b20..9c029c48d3e69ea7124fa6e17fc38e0d5f708342 100644 (file)
@@ -1920,16 +1920,9 @@ struct tevent_req *cli_unlink_send(TALLOC_CTX *mem_ctx,
 
 static void cli_unlink_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_unlink_done2(struct tevent_req *subreq)