From: Stefan Metzmacher Date: Thu, 23 Oct 2014 05:15:14 +0000 (+0200) Subject: tevent: use struct initializers for tevent_timer X-Git-Tag: tevent-0.9.37~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b983aca86d368c5e86f081315f28a42482b8e47d;p=thirdparty%2Fsamba.git tevent: use struct initializers for tevent_timer Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/lib/tevent/tevent_timed.c b/lib/tevent/tevent_timed.c index 92f3ed17b26..ae1eb98d8b2 100644 --- a/lib/tevent/tevent_timed.c +++ b/lib/tevent/tevent_timed.c @@ -224,13 +224,14 @@ static struct tevent_timer *tevent_common_add_timer_internal( te = talloc(mem_ctx?mem_ctx:ev, struct tevent_timer); if (te == NULL) return NULL; - te->event_ctx = ev; - te->next_event = next_event; - te->handler = handler; - te->private_data = private_data; - te->handler_name = handler_name; - te->location = location; - te->additional_data = NULL; + *te = (struct tevent_timer) { + .event_ctx = ev, + .next_event = next_event, + .handler = handler, + .private_data = private_data, + .handler_name = handler_name, + .location = location, + }; if (ev->timer_events == NULL) { ev->last_zero_timer = NULL;