diff options
Diffstat (limited to 'apps/plugins/alpine_cdc.c')
-rw-r--r-- | apps/plugins/alpine_cdc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c index a7aeec306f..494fa17842 100644 --- a/apps/plugins/alpine_cdc.c +++ b/apps/plugins/alpine_cdc.c | |||
@@ -669,16 +669,16 @@ void dump_packet(char* dest, int dst_size, char* src, int n) | |||
669 | 669 | ||
670 | bool bit_test(unsigned char* buf, unsigned bit) | 670 | bool bit_test(unsigned char* buf, unsigned bit) |
671 | { | 671 | { |
672 | return (buf[bit/4] & (0x01 << bit%4)) != 0; | 672 | return (buf[bit>>2] & BIT_N(bit&3)) != 0; |
673 | } | 673 | } |
674 | 674 | ||
675 | 675 | ||
676 | void bit_set(unsigned char* buf, unsigned bit, bool val) | 676 | void bit_set(unsigned char* buf, unsigned bit, bool val) |
677 | { | 677 | { |
678 | if (val) | 678 | if (val) |
679 | buf[bit/4] |= (0x01 << bit%4); | 679 | buf[bit>>2] |= BIT_N(bit&3); |
680 | else | 680 | else |
681 | buf[bit/4] &= ~(0x01 << bit%4); | 681 | buf[bit>>2] &= ~BIT_N(bit&3); |
682 | } | 682 | } |
683 | 683 | ||
684 | 684 | ||