diff options
author | Eric Wild <ewild@sysmocom.de> | 2019-11-26 17:57:06 +0100 |
---|---|---|
committer | Eric Wild <ewild@sysmocom.de> | 2019-11-28 13:42:16 +0100 |
commit | 20a836890ac343a35d1b243959f449f6393e0917 (patch) | |
tree | ce2836c99b250eff6d2ceca73fdd83882238c1d3 | |
parent | 2288703527f104dbcc717bc68362d289e3541bc9 (diff) |
prettier slot bitmask code
Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2
-rw-r--r-- | sysmoOCTSIM/main.c | 4 |
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; |