rpc_server3: Inline make_base_pipes_struct()
authorVolker Lendecke <vl@samba.org>
Mon, 4 Oct 2021 10:37:30 +0000 (12:37 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 5 Jan 2022 00:11:37 +0000 (00:11 +0000)
This did not even use all its arguments anymore.

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

index ce41bf564b37ffe3ea897fbc90ecfe0c84c0675c..0f0be81c742dea0e6aa87556a6e421599550f39c 100644 (file)
@@ -161,27 +161,6 @@ static int dcesrv_connection_destructor(struct dcesrv_connection *conn)
        return 0;
 }
 
-static int make_base_pipes_struct(
-       TALLOC_CTX *mem_ctx,
-       struct messaging_context *msg_ctx,
-       const char *pipe_name,
-       enum dcerpc_transport_t transport,
-       struct pipes_struct **_p)
-{
-       struct pipes_struct *p;
-
-       p = talloc_zero(mem_ctx, struct pipes_struct);
-       if (!p) {
-               return ENOMEM;
-       }
-
-       p->msg_ctx = msg_ctx;
-       p->transport = transport;
-
-       *_p = p;
-       return 0;
-}
-
 /*
  * A new client has been passed to us from samba-dcerpcd.
  */
@@ -407,17 +386,13 @@ static void rpc_worker_new_client(
                goto fail;
        }
 
-       ret = make_base_pipes_struct(
-               ncacn_conn,
-               ncacn_conn->msg_ctx,
-               client->binding,
-               transport,
-               &ncacn_conn->p);
-       if (ret != 0) {
-               DBG_DEBUG("make_base_pipes_struct failed: %s\n",
-                         strerror(ret));
+       ncacn_conn->p = talloc_zero(ncacn_conn, struct pipes_struct);
+       if (ncacn_conn->p == NULL) {
+               DBG_DEBUG("talloc failed\n");
                goto fail;
        }
+       ncacn_conn->p->msg_ctx = ncacn_conn->msg_ctx;
+       ncacn_conn->p->transport = transport;
 
        status = dcesrv_endpoint_connect(
                ncacn_conn->dce_ctx,