From 551e268ac307bd352b2d45d3089319294261c9cd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 21 Dec 2015 21:29:13 +0100 Subject: tldap: Use struct initializer in tldap_search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoids a call to ZERO_STRUCT Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Mon Jan 11 01:31:59 CET 2016 on sn-devel-144 --- source3/lib/tldap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source3/lib/tldap.c') diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c index a1e11a36580..d8b4f241bac 100644 --- a/source3/lib/tldap.c +++ b/source3/lib/tldap.c @@ -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) { -- cgit v1.2.1