diff --git a/srslte/lib/common/phy_common.c b/srslte/lib/common/phy_common.c index e3429e0a3..68532ebeb 100644 --- a/srslte/lib/common/phy_common.c +++ b/srslte/lib/common/phy_common.c @@ -431,14 +431,9 @@ float get_fd(struct lte_band *band, uint32_t earfcn) { } int srslte_band_get_band(uint32_t earfcn) { - uint32_t i; - i=0; - while(i < SRSLTE_NOF_LTE_BANDS && lte_bands[i].earfcn_offset 0 && lte_bands[i].earfcn_offset>earfcn) { + i--; } return lte_bands[i].band; }