From 91be76dbe93a2be763a93163bec8c17d35057944 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 24 Jun 2014 12:04:25 +1000 Subject: ctdb-daemon: Simplify code a bit Signed-off-by: Amitay Isaacs Reviewed-by: Stefan Metzmacher --- ctdb/server/ctdb_ltdb_server.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c index 14bfdc32a6..bec27c8992 100644 --- a/ctdb/server/ctdb_ltdb_server.c +++ b/ctdb/server/ctdb_ltdb_server.c @@ -1065,6 +1065,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, struct ctdb_db_context *db; struct ctdb_node *node = ctdb->nodes[ctdb->pnn]; struct ctdb_client *client = NULL; + bool with_jenkinshash; if (ctdb->tunable.allow_client_db_attach == 0) { DEBUG(DEBUG_ERR, ("DB Attach to database %s denied by tunable " @@ -1134,7 +1135,10 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, return 0; } - if (ctdb_local_attach(ctdb, db_name, persistent, NULL, (tdb_flags&TDB_INCOMPATIBLE_HASH)?true:false) != 0) { + with_jenkinshash = (tdb_flags & TDB_INCOMPATIBLE_HASH) ? true : false; + + if (ctdb_local_attach(ctdb, db_name, persistent, NULL, + with_jenkinshash) != 0) { return -1; } -- cgit