aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wild <ewild@sysmocom.de>2019-11-26 17:57:06 +0100
committerEric Wild <ewild@sysmocom.de>2019-11-28 13:42:16 +0100
commit20a836890ac343a35d1b243959f449f6393e0917 (patch)
treece2836c99b250eff6d2ceca73fdd83882238c1d3
parent2288703527f104dbcc717bc68362d289e3541bc9 (diff)
prettier slot bitmask code
-rw-r--r--sysmoOCTSIM/main.c4
1 files changed, 2 insertions, 2 deletions
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 @@ static struct msgb *ccid_gen_notify_slot_status(uint8_t old_bm, uint8_t new_bm)
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;