git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a9620b
)
dbwrap_tdb: use struct initializer
author
Ralph Boehme
<slow@samba.org>
Sat, 18 Aug 2018 06:35:27 +0000
(08:35 +0200)
committer
Jeremy 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
patch
|
blob
|
history
diff --git
a/lib/dbwrap/dbwrap_tdb.c
b/lib/dbwrap/dbwrap_tdb.c
index 19f2f009c0c21863fa9980089f72f28b57b39c0e..d695f3bd732e7e6f636dac9236263c2d690a0734 100644
(file)
--- 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,