dbwrap_tdb: use struct initializer
authorRalph Boehme <slow@samba.org>
Sat, 18 Aug 2018 06:35:27 +0000 (08:35 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 12 Sep 2018 20:25:19 +0000 (22:25 +0200)
This ensures all struct members are implicitly initialized.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/dbwrap/dbwrap_tdb.c

index 19f2f00..d695f3b 100644 (file)
@@ -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,