selinux: enclose macro arguments in parenthesis
authorChristian Göttsche <cgzones@googlemail.com>
Tue, 25 Jan 2022 14:14:14 +0000 (15:14 +0100)
committerPaul Moore <paul@paul-moore.com>
Wed, 26 Jan 2022 20:13:58 +0000 (15:13 -0500)
commit9e2fe574c02bde46307255467a5e4291f65227fe
tree5a94795947835f92fe02bbcf9a93ee369c0ddbfc
parentd3b1161f29cf479b86d4c3c6f200a8eb27254877
selinux: enclose macro arguments in parenthesis

Enclose the macro arguments in parenthesis to avoid potential evaluation
order issues.

Note the xperm and ebitmap macros are still not side-effect safe due to
double evaluation.

Reported by clang-tidy [bugprone-macro-parentheses]

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/include/security.h
security/selinux/ss/ebitmap.h
security/selinux/ss/sidtab.c