rpc_client: Use tevent_req_nterror() properly in cli_api_pipe
authorVolker Lendecke <vl@samba.org>
Fri, 6 Aug 2021 12:05:30 +0000 (14:05 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 24 Aug 2021 17:32:29 +0000 (17:32 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_client/cli_pipe.c

index 871ec09ad6a7e8687d7d1cfaa38c016663e57ecf..84fbb4552339331640bf3c53dc59338845d41d53 100644 (file)
@@ -652,8 +652,7 @@ static void cli_api_pipe_trans_done(struct tevent_req *subreq)
        status = state->transport->trans_recv(subreq, state, &state->rdata,
                                              &state->rdata_len);
        TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
+       if (tevent_req_nterror(req, status)) {
                return;
        }
        tevent_req_done(req);
@@ -669,8 +668,7 @@ static void cli_api_pipe_write_done(struct tevent_req *subreq)
 
        status = rpc_write_recv(subreq);
        TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
+       if (tevent_req_nterror(req, status)) {
                return;
        }
 
@@ -704,8 +702,7 @@ static void cli_api_pipe_read_done(struct tevent_req *subreq)
 
        status = state->transport->read_recv(subreq, &received);
        TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
+       if (tevent_req_nterror(req, status)) {
                return;
        }
        state->rdata_len = received;