tldap: Use struct initializer in tldap_search
authorVolker Lendecke <vl@samba.org>
Mon, 21 Dec 2015 20:29:13 +0000 (21:29 +0100)
committerRalph Boehme <slow@samba.org>
Mon, 11 Jan 2016 00:31:59 +0000 (01:31 +0100)
Avoids a call to ZERO_STRUCT

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jan 11 01:31:59 CET 2016 on sn-devel-144

source3/lib/tldap.c

index a1e11a36580a1fb73e536c5ca86e6a129fca5cc0..d8b4f241bac520dceb52fb8186686b428145fcd6 100644 (file)
@@ -1840,11 +1840,9 @@ int tldap_search(struct tldap_context *ld,
        TALLOC_CTX *frame = talloc_stackframe();
        struct tevent_context *ev;
        struct tevent_req *req;
-       struct tldap_sync_search_state state;
-
-       ZERO_STRUCT(state);
-       state.mem_ctx = mem_ctx;
-       state.rc = TLDAP_SUCCESS;
+       struct tldap_sync_search_state state = {
+               .mem_ctx = mem_ctx, .rc = TLDAP_SUCCESS
+       };
 
        ev = samba_tevent_context_init(frame);
        if (ev == NULL) {