]> git.puffer.fish Git - mirror/frr.git/commitdiff
mgmtd: adjust one unnecessary bool convert 13977/head
authoranlan_cs <vic.lan@pica8.com>
Mon, 10 Jul 2023 05:36:24 +0000 (13:36 +0800)
committeranlan_cs <vic.lan@pica8.com>
Wed, 12 Jul 2023 09:29:28 +0000 (17:29 +0800)
It is unnecessary to do the bool calculation for expression.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
mgmtd/mgmt_fe_adapter.c
mgmtd/mgmt_txn.c

index c12d8646b17c5b71043b66f86f43c6f58652a5be..a4bb33d61be662d325a4b8ae4974bd00283c9d91 100644 (file)
@@ -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);
 }
 
index eff3b7e34c1e15b821d0f51a18deb67c86ea0671..53b9b7df46c269a16a4cbe9e3f26312142816840 100644 (file)
@@ -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!");