Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12246 )

Change subject: cosmetic: use const pointer for bts_data
......................................................................

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
---
M src/tbf_dl.cpp
M src/tbf_ul.cpp
2 files changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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 @@

 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::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);
 }

--
To view, visit https://gerrit.osmocom.org/12246
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b
Gerrit-Change-Number: 12246
Gerrit-PatchSet: 4
Gerrit-Owner: Max <sur...@alumni.ntnu.no>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <sur...@alumni.ntnu.no>
Gerrit-Reviewer: Pau Espin Pedrol <pes...@sysmocom.de>
Gerrit-Reviewer: osmith <osm...@sysmocom.de>

Reply via email to