From 1dba49859348d01558d434bfa65734ff532b09c9 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 20 Oct 2015 11:35:23 +0200 Subject: [PATCH] s4:lib/messaging: use a helper variable for tdb flags Small refactoring that eliminates a nested function call. These are a pita when stepping with gdb. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11562 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Oct 20 14:54:57 CEST 2015 on sn-devel-104 --- source4/lib/messaging/messaging.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 6d891e56e67..0fc180be2a4 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -312,6 +312,7 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx, bool ok; int ret; const char *lock_dir = NULL; + int tdb_flags = TDB_INCOMPATIBLE_HASH | TDB_CLEAR_IF_FIRST; if (ev == NULL) { return NULL; @@ -368,10 +369,9 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx, msg->start_time = timeval_current(); - msg->names = server_id_db_init( - msg, server_id, lock_dir, 0, - TDB_INCOMPATIBLE_HASH|TDB_CLEAR_IF_FIRST| - lpcfg_tdb_flags(lp_ctx, 0)); + tdb_flags |= lpcfg_tdb_flags(lp_ctx, 0); + + msg->names = server_id_db_init(msg, server_id, lock_dir, 0, tdb_flags); if (msg->names == NULL) { goto fail; } -- 2.11.4.GIT