]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
xenstore.h: Put ( ) around XS_* define shifts
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 9 Oct 2018 15:25:38 +0000 (16:25 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Tue, 9 Oct 2018 16:56:03 +0000 (17:56 +0100)
These definitions were not properly protected from unwanted operator
precedence interactions.

Existing use sites in-tree all use & or |, so this does not change any
actual behaviour in-tree.

The same seems likely to be true in external callers.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xenstore/include/xenstore.h

index 0d95bb0e5ccd919d7dac4f0da83f7b01fd670dd8..996b75ab0d789171899d5c4d7453e466bd37381b 100644 (file)
@@ -23,8 +23,8 @@
 
 #define XBT_NULL 0
 
-#define XS_OPEN_READONLY       1UL<<0
-#define XS_OPEN_SOCKETONLY      1UL<<1
+#define XS_OPEN_READONLY       (1UL<<0)
+#define XS_OPEN_SOCKETONLY      (1UL<<1)
 
 /*
  * Setting XS_UNWATCH_FILTER arranges that after xs_unwatch, no
@@ -45,7 +45,7 @@
  *                                  xs_unwatch for the first watch
  *                                  has returned.
  */
-#define XS_UNWATCH_FILTER     1UL<<2
+#define XS_UNWATCH_FILTER     (1UL<<2)
 
 struct xs_handle;
 typedef uint32_t xs_transaction_t;