Change in osmo-pcu[master]: cosmetic: use const pointer for bts_data

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Tue Dec 11 16:20:33 UTC 2018


Max has uploaded this change for review. ( 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, 6 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/46/12246/1

diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index dd24963..01331a6 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -1357,9 +1357,10 @@
 
 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 02f4ddb..f877484 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -593,8 +593,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: newchange
Gerrit-Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b
Gerrit-Change-Number: 12246
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181211/e302f3fb/attachment.htm>


More information about the gerrit-log mailing list