diff --git a/urjtag/include/bitmask.h b/urjtag/include/bitmask.h index c65086b9..a2e46182 100644 --- a/urjtag/include/bitmask.h +++ b/urjtag/include/bitmask.h @@ -55,9 +55,9 @@ #define BITS_ABS(a) (((((a) + MAX_BITS_ABS_VAL) / MAX_BITS_ABS_VAL) * 2 - 1) * (a)) #define BITS_MIN(a,b) (((a) + (b) - BITS_ABS((a) - (b))) / 2) -#define URJ_BIT (b) (1 << (b)) -#define URJ_BITS (b1,b2) (((2 << BITS_ABS((b1) - (b2))) - 1) << BITS_MIN(b1,b2)) -#define URJ_BITS_VAL (b1,b2,v) (((v) << BITS_MIN(b1,b2)) & URJ_BITS (b1,b2)) -#define URJ_BITS_GET (b1,b2,v) (((v) & URJ_BITS (b1,b2)) >> BITS_MIN(b1,b2)) +#define URJ_BIT(b) (1 << (b)) +#define URJ_BITS(b1,b2) (((2 << BITS_ABS((b1) - (b2))) - 1) << BITS_MIN(b1,b2)) +#define URJ_BITS_VAL(b1,b2,v) (((v) << BITS_MIN(b1,b2)) & URJ_BITS (b1,b2)) +#define URJ_BITS_GET(b1,b2,v) (((v) & URJ_BITS (b1,b2)) >> BITS_MIN(b1,b2)) #endif /* COMMON_H */