Przeglądaj źródła

* Add () around BIT|BIT)

Bryan Drewery 17 lat temu
rodzic
commit
b0650e0d90
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/adns.c

+ 2 - 2
src/adns.c

@@ -84,12 +84,12 @@ typedef struct {
 } dns_header_t;
 
 #define GET_QR(x)     (((x) >> 15) & BIT0)
-#define GET_OPCODE(x) (((x) >> 11) & BIT3|BIT2|BIT1|BIT0)
+#define GET_OPCODE(x) (((x) >> 11) & (BIT3|BIT2|BIT1|BIT0))
 #define GET_AA(x)     (((x) >> 10) & BIT0)
 #define GET_TC(x)     (((x) >> 9)  & BIT0)
 #define GET_RD(x)     (((x) >> 8)  & BIT0)
 #define GET_RA(x)     (((x) >> 7)  & BIT0)
-#define GET_RCODE(x)  ((x)         & BIT3|BIT2|BIT1|BIT0)
+#define GET_RCODE(x)  ((x)         & (BIT3|BIT2|BIT1|BIT0))
 
 #define SET_RD(x) (x) |= ((x) | (1 << 8))