From 92acfc07998da1546182579ad12a063f025c9286 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 May 2006 07:35:06 +0000 Subject: r15855: more talloc_set_destructor() typesafe fixes. nearly done ... (This used to be commit 396d82a231b6e3a91178db08b706626d4d4b420c) --- source4/rpc_server/dcerpc_server.c | 4 +--- source4/rpc_server/handles.c | 3 +-- source4/rpc_server/srvsvc/srvsvc_ntvfs.c | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index a0a0148959..fcc1989cec 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -266,10 +266,8 @@ _PUBLIC_ NTSTATUS dcesrv_fetch_session_key(struct dcesrv_connection *p, /* destroy a link to an endpoint */ -static int dcesrv_endpoint_destructor(void *ptr) +static int dcesrv_endpoint_destructor(struct dcesrv_connection *p) { - struct dcesrv_connection *p = ptr; - while (p->contexts) { struct dcesrv_connection_context *c = p->contexts; diff --git a/source4/rpc_server/handles.c b/source4/rpc_server/handles.c index 6a7bf88310..c86550aa72 100644 --- a/source4/rpc_server/handles.c +++ b/source4/rpc_server/handles.c @@ -27,9 +27,8 @@ /* destroy a rpc handle */ -static int dcesrv_handle_destructor(void *ptr) +static int dcesrv_handle_destructor(struct dcesrv_handle *h) { - struct dcesrv_handle *h = ptr; DLIST_REMOVE(h->context->handles, h); talloc_free(h); return 0; diff --git a/source4/rpc_server/srvsvc/srvsvc_ntvfs.c b/source4/rpc_server/srvsvc/srvsvc_ntvfs.c index 7dbaaa0f23..9fafb8a3cd 100644 --- a/source4/rpc_server/srvsvc/srvsvc_ntvfs.c +++ b/source4/rpc_server/srvsvc/srvsvc_ntvfs.c @@ -43,9 +43,8 @@ struct srvsvc_ntvfs_ctx { struct ntvfs_context *ntvfs; }; -static int srvsvc_ntvfs_ctx_destructor(void *p) +static int srvsvc_ntvfs_ctx_destructor(struct srvsvc_ntvfs_ctx *c) { - struct srvsvc_ntvfs_ctx *c = talloc_get_type(p, struct srvsvc_ntvfs_ctx); ntvfs_disconnect(c->ntvfs); return 0; } -- cgit