From c826c838d46752aef6fba294f9f73094549853c5 Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Mon, 10 Jul 2023 13:36:24 +0800 Subject: [PATCH] mgmtd: adjust one unnecessary bool convert It is unnecessary to do the bool calculation for expression. Signed-off-by: anlan_cs --- mgmtd/mgmt_fe_adapter.c | 3 +-- mgmtd/mgmt_txn.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c index c12d8646b1..a4bb33d61b 100644 --- a/mgmtd/mgmt_fe_adapter.c +++ b/mgmtd/mgmt_fe_adapter.c @@ -1160,8 +1160,7 @@ int mgmt_fe_send_set_cfg_reply(uint64_t session_id, uint64_t txn_id, } return fe_adapter_send_set_cfg_reply(session, ds_id, req_id, - result == MGMTD_SUCCESS ? true - : false, + result == MGMTD_SUCCESS, error_if_any, implicit_commit); } diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c index eff3b7e34c..53b9b7df46 100644 --- a/mgmtd/mgmt_txn.c +++ b/mgmtd/mgmt_txn.c @@ -1380,8 +1380,7 @@ static int mgmt_txn_send_be_cfg_data(struct mgmt_txn_ctx *txn, batch->batch_id, cfg_req.cfgdata_reqs, cfg_req.num_reqs, - indx == num_batches ? true - : false)) { + indx == num_batches)) { (void)mgmt_txn_send_commit_cfg_reply( txn, MGMTD_INTERNAL_ERROR, "Internal Error! Could not send config data to backend!"); -- 2.39.5