From 382620d42dd12fc9bb946b15044ae09a569abca7 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sat, 18 Aug 2018 08:35:27 +0200 Subject: dbwrap_tdb: use struct initializer This ensures all struct members are implicitly initialized. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- lib/dbwrap/dbwrap_tdb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/dbwrap') diff --git a/lib/dbwrap/dbwrap_tdb.c b/lib/dbwrap/dbwrap_tdb.c index 19f2f009c0c..d695f3bd732 100644 --- a/lib/dbwrap/dbwrap_tdb.c +++ b/lib/dbwrap/dbwrap_tdb.c @@ -118,8 +118,9 @@ static struct db_record *db_tdb_fetch_locked_internal( struct tdb_fetch_locked_state state; int ret; - state.mem_ctx = mem_ctx; - state.result = NULL; + state = (struct tdb_fetch_locked_state) { + .mem_ctx = mem_ctx, + }; ret = tdb_parse_record(ctx->wtdb->tdb, key, -- cgit v1.2.1