libsmb: Use tevent_req_simple_finish_ntstatus
authorVolker Lendecke <vl@samba.org>
Thu, 14 Mar 2019 19:46:45 +0000 (20:46 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 18 Mar 2019 19:21:23 +0000 (19:21 +0000)
Less lines of code

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

index d648b495fc6cd0a4e426077676ea4475293dcde9..421e26f60863e37e1c412e866504f20f09f397cc 100644 (file)
@@ -1311,16 +1311,9 @@ static struct tevent_req *cli_ntrename_internal_send(TALLOC_CTX *mem_ctx,
 
 static void cli_ntrename_internal_done(struct tevent_req *subreq)
 {
 
 static void cli_ntrename_internal_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 NTSTATUS cli_ntrename_internal_recv(struct tevent_req *req)
 }
 
 static NTSTATUS cli_ntrename_internal_recv(struct tevent_req *req)