Change in ...osmocom-bb[master]: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Jun 24 13:45:29 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14581 )

Change subject: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation
......................................................................

trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation

Ubsan is unhappy about shifts into the sign bit of our implicitly
promoted value.

Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
---
M src/host/trxcon/sched_lchan_sch.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/trxcon/sched_lchan_sch.c b/src/host/trxcon/sched_lchan_sch.c
index e1977e1..9eed506 100644
--- a/src/host/trxcon/sched_lchan_sch.c
+++ b/src/host/trxcon/sched_lchan_sch.c
@@ -47,7 +47,7 @@
 	uint8_t t3p;
 	uint32_t sb;
 
-	sb = (sb_info[3] << 24)
+	sb = ((uint32_t)sb_info[3] << 24)
 	   | (sb_info[2] << 16)
 	   | (sb_info[1] << 8)
 	   | sb_info[0];

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
Gerrit-Change-Number: 14581
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190624/32ca3b7d/attachment.htm>


More information about the gerrit-log mailing list