tevent: Simplify create_immediate
authorVolker Lendecke <vl@samba.org>
Sat, 17 Jun 2017 19:26:27 +0000 (21:26 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 21 Jun 2017 01:15:07 +0000 (03:15 +0200)
Not much change, just 9 lines less of code.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
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;
 }