mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Preserve brackets in DNS_SLABHEADER_GETATTR macro
We need to turn off clang-format to preserve the brackets as
'attribute' can be an expression and we need it to be evaluated
first.
Similarly we need the entire result to be evaluated independent of
the adjoining code.
(cherry picked from commit 3620db5ea6
)
This commit is contained in:
@@ -154,8 +154,10 @@ enum {
|
|||||||
DNS_SLABHEADERATTR_STALE_WINDOW = 1 << 13,
|
DNS_SLABHEADERATTR_STALE_WINDOW = 1 << 13,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* clang-format off : RemoveParentheses */
|
||||||
#define DNS_SLABHEADER_GETATTR(header, attribute) \
|
#define DNS_SLABHEADER_GETATTR(header, attribute) \
|
||||||
(atomic_load_acquire(&(header)->attributes) & attribute)
|
(atomic_load_acquire(&(header)->attributes) & (attribute))
|
||||||
|
/* clang-format on */
|
||||||
#define DNS_SLABHEADER_SETATTR(header, attribute) \
|
#define DNS_SLABHEADER_SETATTR(header, attribute) \
|
||||||
atomic_fetch_or_release(&(header)->attributes, attribute)
|
atomic_fetch_or_release(&(header)->attributes, attribute)
|
||||||
#define DNS_SLABHEADER_CLRATTR(header, attribute) \
|
#define DNS_SLABHEADER_CLRATTR(header, attribute) \
|
||||||
|
Reference in New Issue
Block a user