aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-12-11 16:47:30 +0100
committerHarald Welte <laforge@gnumonks.org>2019-04-08 07:36:11 +0000
commit34513feff98eb84028332cc54596d1e1748c0f71 (patch)
treed1401b2039ea7f6543fa68a364786769fa708a09
parent902e3e58db69c33d375357b47f5511e4bbf891c4 (diff)
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
-rw-r--r--src/tbf_dl.cpp6
-rw-r--r--src/tbf_ul.cpp5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index c97436a..d5e4a45 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -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);
}
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index fd7d73b..e1a0fbd 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -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);
}