[PATCH] osmo-bsc[master]: Use type bool for boolean fields in gsm48_si_ro_info

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Nov 24 12:58:20 UTC 2017


Review at  https://gerrit.osmocom.org/5026

Use type bool for boolean fields in gsm48_si_ro_info

Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c
---
M include/osmocom/bsc/rest_octets.h
M src/libbsc/system_information.c
2 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/5026/1

diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h
index e6e5303..568505a 100644
--- a/include/osmocom/bsc/rest_octets.h
+++ b/include/osmocom/bsc/rest_octets.h
@@ -41,15 +41,15 @@
 struct gsm48_si_ro_info {
 	struct gsm48_si_selection_params selection_params;
 	struct gsm48_si_power_offset power_offset;
-	uint8_t si2ter_indicator;
-	uint8_t early_cm_ctrl;
+	bool si2ter_indicator;
+	bool early_cm_ctrl;
 	struct {
 		uint8_t where:3,
 			 present:1;
 	} scheduling;
 	struct gsm48_si3_gprs_ind gprs_ind;
 	/* SI 3 specific */
-	uint8_t si2quater_indicator;
+	bool si2quater_indicator;
 	/* SI 4 specific */
 	struct gsm48_lsa_params lsa_params;
 	uint16_t cell_id;
diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c
index 91e993d..d54dad8 100644
--- a/src/libbsc/system_information.c
+++ b/src/libbsc/system_information.c
@@ -815,8 +815,8 @@
 	.power_offset = {
 		.present = 0,
 	},
-	.si2ter_indicator = 0,
-	.early_cm_ctrl = 1,
+	.si2ter_indicator = false,
+	.early_cm_ctrl = true,
 	.scheduling = {
 		.present = 0,
 	},
@@ -825,7 +825,7 @@
 		.ra_colour = 0,
 		.present = 1,
 	},
-	.si2quater_indicator = 0,
+	.si2quater_indicator = false,
 	.lsa_params = {
 		.present = 0,
 	},
@@ -859,16 +859,16 @@
 
 	if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2ter)) {
 		LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n");
-		si_info.si2ter_indicator = 1;
+		si_info.si2ter_indicator = true;
 	} else {
-		si_info.si2ter_indicator = 0;
+		si_info.si2ter_indicator = false;
 	}
 	if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_2quater)) {
 		LOGP(DRR, LOGL_INFO, "SI 2quater is included, based on %zu EARFCNs and %zu UARFCNs.\n",
 		     si2q_earfcn_count(&bts->si_common.si2quater_neigh_list), bts->si_common.uarfcn_length);
-		si_info.si2quater_indicator = 1;
+		si_info.si2quater_indicator = true;
 	} else {
-		si_info.si2quater_indicator = 0;
+		si_info.si2quater_indicator = false;
 	}
 	si_info.early_cm_ctrl = bts->early_classmark_allowed;
 

-- 
To view, visit https://gerrit.osmocom.org/5026
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list