cosmetic: use const pointer for bts_data

It's used several time for logging so let's call it once to make code
easier to follow.

Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b
This commit is contained in:
Max 2018-12-11 16:47:30 +01:00 committed by Harald Welte
parent 902e3e58db
commit 34513feff9
2 changed files with 7 additions and 4 deletions

View File

@ -1350,9 +1350,11 @@ enum egprs_rlcmac_dl_spb gprs_rlcmac_dl_tbf::get_egprs_dl_spb(const int bsn)
void gprs_rlcmac_dl_tbf::set_window_size()
{
uint16_t ws = egprs_window_size(bts->bts_data(), dl_slots());
const struct gprs_rlcmac_bts *b = bts->bts_data();
uint16_t ws = egprs_window_size(b, dl_slots());
LOGPTBFDL(this, LOGL_INFO, "setting EGPRS DL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n",
ws, bts->bts_data()->ws_base, pcu_bitcount(dl_slots()), bts->bts_data()->ws_pdch);
ws, b->ws_base, pcu_bitcount(dl_slots()), b->ws_pdch);
m_window.set_ws(ws);
}

View File

@ -588,8 +588,9 @@ void gprs_rlcmac_ul_tbf::update_coding_scheme_counter_ul(enum CodingScheme cs)
void gprs_rlcmac_ul_tbf::set_window_size()
{
uint16_t ws = egprs_window_size(bts->bts_data(), ul_slots());
const struct gprs_rlcmac_bts *b = bts->bts_data();
uint16_t ws = egprs_window_size(b, ul_slots());
LOGPTBFUL(this, LOGL_INFO, "setting EGPRS UL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n",
ws, bts->bts_data()->ws_base, pcu_bitcount(ul_slots()), bts->bts_data()->ws_pdch);
ws, b->ws_base, pcu_bitcount(ul_slots()), b->ws_pdch);
m_window.set_ws(ws);
}