Change in osmo-ccid-firmware[master]: prettier slot bitmask code

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
Wed Nov 27 18:44:16 UTC 2019


Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 )


Change subject: prettier slot bitmask code
......................................................................

prettier slot bitmask code

Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2
---
M sysmoOCTSIM/main.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/95/16295/1

diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c
index e3d7034..07c5af8 100644
--- a/sysmoOCTSIM/main.c
+++ b/sysmoOCTSIM/main.c
@@ -273,8 +273,8 @@
 
 	for(int i = 0; i <8; i++) {
 		uint8_t byteidx = i >> 2;
-		uint8_t old_bit = old_bm & (1 << i);
-		uint8_t new_bit = new_bm & (1 << i);
+		uint8_t old_bit = (old_bm >> i) & 1;
+		uint8_t new_bit = (new_bm >> i) & 1;
 		uint8_t bv;
 		if (old_bit == new_bit && new_bit == 0)
 			bv = 0x00;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2
Gerrit-Change-Number: 16295
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191127/c3365a23/attachment.htm>


More information about the gerrit-log mailing list