[XS] Change in osmo-bsc[master]: gsm_set_bts_type(): fix switch statement
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42728?usp=email ) Change subject: gsm_set_bts_type(): fix switch statement ...................................................................... gsm_set_bts_type(): fix switch statement The switch statement on (bts->type) in this function exhibited two defects: 1) From the beginning, each unhandled BTS type was listed explicitly, instead of providing a default case; 2) When Nokia-specific initialization was added in 2015, the addition was erroneously applied to GSM_BTS_TYPE_BS11 and GSM_BTS_TYPE_UNKNOWN cases, besides the intended case of GSM_BTS_TYPE_NOKIA_SITE. Fixes: 56e1766dba1a03e304e51d079e65406542e7887c Change-Id: Ibf500c373b69a69182885d5e700abc6fb1b03ccd --- M src/osmo-bsc/bts.c 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 2ec4865..d295bfd 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -742,14 +742,12 @@ INIT_LLIST_HEAD(&bts->rbs2000.is.conn_groups); INIT_LLIST_HEAD(&bts->rbs2000.con.conn_groups); break; - case GSM_BTS_TYPE_BS11: - case GSM_BTS_TYPE_UNKNOWN: case GSM_BTS_TYPE_NOKIA_SITE: /* Set default BTS reset timer */ bts->nokia.bts_reset_timer_cnf = 15; /* Enable Rx diversity by default, for backward compat */ bts->nokia.rx_diversity = 1; - case _NUM_GSM_BTS_TYPE: + default: break; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42728?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ibf500c373b69a69182885d5e700abc6fb1b03ccd Gerrit-Change-Number: 42728 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon@freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
laforge