From fce54bf071a7cf86dfdec7b858a0c5254542e6d4 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sun, 9 Sep 2018 18:48:13 +0200 Subject: [PATCH] dbwrap_ctdb: use struct initializer in db_ctdb_traverse_read() This ensures all struct members are implicitly initialized. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/lib/dbwrap/dbwrap_ctdb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 323cc0bea14..b822816454a 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -1757,10 +1757,11 @@ static int db_ctdb_traverse_read(struct db_context *db, struct db_ctdb_ctx); struct traverse_state state; - state.db = db; - state.fn = fn; - state.private_data = private_data; - state.count = 0; + state = (struct traverse_state) { + .db = db, + .fn = fn, + .private_data = private_data, + }; if (db->persistent) { /* for persistent databases we don't need to do a ctdb traverse,