mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/rbtree: fix MISRA C 2012 Rule 20.7 violation
In macro __rb_parent(), add parentheses around the macro parameter to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
c5659ef2da
commit
696ee5ca9f
1 file changed
+1
-1
+1
-1
@@ -46,7 +46,7 @@
|
||||
#define RB_RED 0
|
||||
#define RB_BLACK 1
|
||||
|
||||
#define __rb_parent(pc) ((struct rb_node *)(pc & ~3))
|
||||
#define __rb_parent(pc) ((struct rb_node *)((pc) & ~3))
|
||||
|
||||
#define __rb_color(pc) ((pc) & 1)
|
||||
#define __rb_is_black(pc) __rb_color(pc)
|
||||
|
||||