Change in ...osmocom-bb[master]: trcon: fix shift

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

Hoernchen gerrit-no-reply at lists.osmocom.org
Mon Jun 24 10:43:32 UTC 2019


Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14581


Change subject: trcon: fix shift
......................................................................

trcon: fix shift

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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/81/14581/1

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: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190624/b2f4caf4/attachment.htm>


More information about the gerrit-log mailing list