From: Stefan Metzmacher Date: Thu, 23 Oct 2014 05:15:14 +0000 (+0200) Subject: tevent: use struct initializers for tevent_fd X-Git-Tag: tevent-0.9.37~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=049a06e621adf01b0762217031c509aa7a4ec863;p=thirdparty%2Fsamba.git tevent: use struct initializers for tevent_fd Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/lib/tevent/tevent_fd.c b/lib/tevent/tevent_fd.c index 455961b67c8..f33ae841b39 100644 --- a/lib/tevent/tevent_fd.c +++ b/lib/tevent/tevent_fd.c @@ -60,16 +60,15 @@ struct tevent_fd *tevent_common_add_fd(struct tevent_context *ev, TALLOC_CTX *me fde = talloc(mem_ctx?mem_ctx:ev, struct tevent_fd); if (!fde) return NULL; - fde->event_ctx = ev; - fde->fd = fd; - fde->flags = flags; - fde->handler = handler; - fde->close_fn = NULL; - fde->private_data = private_data; - fde->handler_name = handler_name; - fde->location = location; - fde->additional_flags = 0; - fde->additional_data = NULL; + *fde = (struct tevent_fd) { + .event_ctx = ev, + .fd = fd, + .flags = flags, + .handler = handler, + .private_data = private_data, + .handler_name = handler_name, + .location = location, + }; DLIST_ADD(ev->fd_events, fde);