summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-11-21 11:42:30 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-12-01 05:54:22 +0100
commitd4990bcf7f62ff243f148ec460feab7fad35b6c9 (patch)
tree0a2075822e0fdea94bb1566055c7b8c965172c76
parenta6357d9949c6e0baf7a85beb152bee7e778b633f (diff)
downloadsamba-d4990bcf7f62ff243f148ec460feab7fad35b6c9.tar.gz
s4-rpc_server: Use an initialised static const struct in dcerpc_server_remote_init
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
-rw-r--r--source4/rpc_server/remote/dcesrv_remote.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c
index 760cbd89a2d..c6ef75720f5 100644
--- a/source4/rpc_server/remote/dcesrv_remote.c
+++ b/source4/rpc_server/remote/dcesrv_remote.c
@@ -405,18 +405,16 @@ static bool remote_op_interface_by_name(struct dcesrv_interface *iface, const ch
NTSTATUS dcerpc_server_remote_init(void)
{
NTSTATUS ret;
- struct dcesrv_endpoint_server ep_server;
+ static const struct dcesrv_endpoint_server ep_server = {
+ /* fill in our name */
+ .name = "remote",
- ZERO_STRUCT(ep_server);
+ /* fill in all the operations */
+ .init_server = remote_op_init_server,
- /* fill in our name */
- ep_server.name = "remote";
-
- /* fill in all the operations */
- ep_server.init_server = remote_op_init_server;
-
- ep_server.interface_by_uuid = remote_op_interface_by_uuid;
- ep_server.interface_by_name = remote_op_interface_by_name;
+ .interface_by_uuid = remote_op_interface_by_uuid,
+ .interface_by_name = remote_op_interface_by_name
+ };
/* register ourselves with the DCERPC subsystem. */
ret = dcerpc_register_ep_server(&ep_server);