]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tevent: Simplify create_immediate
authorVolker Lendecke <vl@samba.org>
Sat, 17 Jun 2017 19:26:27 +0000 (21:26 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 14 Nov 2017 11:39:13 +0000 (12:39 +0100)
Not much change, just 9 lines less of code.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit a7504f555eff101a10ded653ceac98d8294c1659)

lib/tevent/tevent.c

index f3b18a1527212104b696fc72c236a0e1870a9914..5f44b035e50c494308ed6f1b005ad97b9fafa461 100644 (file)
@@ -616,16 +616,7 @@ struct tevent_immediate *_tevent_create_immediate(TALLOC_CTX *mem_ctx,
        im = talloc(mem_ctx, struct tevent_immediate);
        if (im == NULL) return NULL;
 
-       im->prev                = NULL;
-       im->next                = NULL;
-       im->event_ctx           = NULL;
-       im->create_location     = location;
-       im->handler             = NULL;
-       im->private_data        = NULL;
-       im->handler_name        = NULL;
-       im->schedule_location   = NULL;
-       im->cancel_fn           = NULL;
-       im->additional_data     = NULL;
+       *im = (struct tevent_immediate) { .create_location = location };
 
        return im;
 }