diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-05-24 07:34:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:08:32 -0500 |
commit | 971d30bb201f5c3faff5f575d26882eb79f7955a (patch) | |
tree | aad4df492eb9c8bf1e105c8bac65dc315b27a1cd /source4/lib/events/events_standard.c | |
parent | cdc64c448df49676c96f87d106af8de0c467651f (diff) | |
download | samba-971d30bb201f5c3faff5f575d26882eb79f7955a.tar.gz samba-971d30bb201f5c3faff5f575d26882eb79f7955a.tar.bz2 samba-971d30bb201f5c3faff5f575d26882eb79f7955a.zip |
r15854: more talloc_set_destructor() typesafe fixes
(This used to be commit 61c6100617589ac6df4f527877241464cacbf8b3)
Diffstat (limited to 'source4/lib/events/events_standard.c')
-rw-r--r-- | source4/lib/events/events_standard.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c index ff11afe5d5..5d59f1b885 100644 --- a/source4/lib/events/events_standard.c +++ b/source4/lib/events/events_standard.c @@ -93,10 +93,8 @@ static uint32_t epoll_map_flags(uint16_t flags) /* free the epoll fd */ -static int epoll_ctx_destructor(void *ptr) +static int epoll_ctx_destructor(struct std_event_context *std_ev) { - struct std_event_context *std_ev = talloc_get_type(ptr, - struct std_event_context); close(std_ev->epoll_fd); std_ev->epoll_fd = -1; return 0; @@ -336,9 +334,8 @@ static void calc_maxfd(struct std_event_context *std_ev) /* destroy an fd_event */ -static int std_event_fd_destructor(void *ptr) +static int std_event_fd_destructor(struct fd_event *fde) { - struct fd_event *fde = talloc_get_type(ptr, struct fd_event); struct event_context *ev = fde->event_ctx; struct std_event_context *std_ev = talloc_get_type(ev->additional_data, struct std_event_context); @@ -420,16 +417,15 @@ static void std_event_set_fd_flags(struct fd_event *fde, uint16_t flags) /* destroy a timed event */ -static int std_event_timed_destructor(void *ptr) +static int std_event_timed_destructor(struct timed_event *te) { - struct timed_event *te = talloc_get_type(ptr, struct timed_event); struct std_event_context *std_ev = talloc_get_type(te->event_ctx->additional_data, struct std_event_context); DLIST_REMOVE(std_ev->timed_events, te); return 0; } -static int std_event_timed_deny_destructor(void *ptr) +static int std_event_timed_deny_destructor(struct timed_event *te) { return -1; } |