aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-05-30 01:39:11 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-03 06:52:37 +0000
commiteda131260549bd55495f53ab93e979a4f0c10f9f (patch)
treebee1952be2e65abe67047fe51dec7947b2a7150f
parent4f3a64182e823be6071eb891dc41dfc14dc7c5cd (diff)
abis_nm: cosmetic: add curly braces to complex 'if' statements
-rw-r--r--src/osmo-bsc/abis_nm.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 4ed060295..a0aead8e3 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -570,25 +570,29 @@ static int parse_attr_resp_info_attr(struct gsm_bts *bts, const struct gsm_bts_t
len = TLVP_LEN(tp, NM_ATT_MANUF_ID);
/* log potential BTS feature vector overflow */
- if (len > sizeof(bts->_features_data))
+ if (len > sizeof(bts->_features_data)) {
LOGP(DNM, LOGL_NOTICE, "BTS%u Get Attributes Response: feature vector is truncated to %u bytes\n",
bts->nr, MAX_BTS_FEATURES/8);
+ }
/* check that max. expected BTS attribute is above given feature vector length */
- if (len > OSMO_BYTES_FOR_BITS(_NUM_BTS_FEAT))
+ if (len > OSMO_BYTES_FOR_BITS(_NUM_BTS_FEAT)) {
LOGP(DNM, LOGL_NOTICE, "BTS%u Get Attributes Response: reported unexpectedly long (%u bytes) "
"feature vector - most likely it was compiled against newer BSC headers. "
"Consider upgrading your BSC to later version.\n",
bts->nr, len);
+ }
memcpy(bts->_features_data, TLVP_VAL(tp, NM_ATT_MANUF_ID), sizeof(bts->_features_data));
- for (i = 0; i < _NUM_BTS_FEAT; i++)
- if (osmo_bts_has_feature(&bts->features, i) != osmo_bts_has_feature(&bts->model->features, i))
+ for (i = 0; i < _NUM_BTS_FEAT; i++) {
+ if (osmo_bts_has_feature(&bts->features, i) != osmo_bts_has_feature(&bts->model->features, i)) {
LOGP(DNM, LOGL_NOTICE, "BTS%u feature '%s' reported via OML does not match statically "
"set feature: %u != %u. Please fix.\n", bts->nr,
get_value_string(osmo_bts_features_descs, i),
osmo_bts_has_feature(&bts->features, i), osmo_bts_has_feature(&bts->model->features, i));
+ }
+ }
}
/* Parse Attribute Response Info content for 3GPP TS 52.021 ยง9.4.28 Manufacturer Dependent State */
@@ -607,10 +611,11 @@ static int parse_attr_resp_info_attr(struct gsm_bts *bts, const struct gsm_bts_t
if (rc > 0) {
for (i = 0; i < rc; i++) {
if (!handle_attr(bts, str2btsattr((const char *)sw_descr[i].file_id),
- sw_descr[i].file_version, sw_descr[i].file_version_len))
+ sw_descr[i].file_version, sw_descr[i].file_version_len)) {
LOGPFOH(DNM, LOGL_NOTICE, foh, "BTS%u: ARI reported sw[%d/%d]: %s "
"is %s\n", bts->nr, i, rc, sw_descr[i].file_id,
sw_descr[i].file_version);
+ }
}
} else {
LOGPFOH(DNM, LOGL_ERROR, foh, "BTS%u: failed to parse SW-Config part of "