diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2022-05-02 16:10:51 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-05-03 14:07:11 -0400 |
commit | 1d4e8036cb2b301842797d447164464896824c58 (patch) | |
tree | 5e2578ccaf0bf534f65e7998f8ac9ced7268001f /security | |
parent | 759205151c09324dcdf788edc6fc6a5768523657 (diff) | |
download | linux-1d4e8036cb2b301842797d447164464896824c58.tar.bz2 |
selinux: avoid extra semicolon
Wrap macro into `do { } while (0)` to avoid Clang emitting warnings
about extra semicolons.
Similar to userspace commit
https://github.com/SELinuxProject/selinux/commit/9d85aa60d12e468e7fd510c2b5475b5299b71622
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: whitespace/indenting tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/ss/avtab.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c index cfdae20792e1..ea9fc69568e3 100644 --- a/security/selinux/ss/avtab.c +++ b/security/selinux/ss/avtab.c @@ -40,15 +40,15 @@ static inline int avtab_hash(const struct avtab_key *keyp, u32 mask) u32 hash = 0; -#define mix(input) { \ - u32 v = input; \ - v *= c1; \ - v = (v << r1) | (v >> (32 - r1)); \ - v *= c2; \ - hash ^= v; \ - hash = (hash << r2) | (hash >> (32 - r2)); \ - hash = hash * m + n; \ -} +#define mix(input) do { \ + u32 v = input; \ + v *= c1; \ + v = (v << r1) | (v >> (32 - r1)); \ + v *= c2; \ + hash ^= v; \ + hash = (hash << r2) | (hash >> (32 - r2)); \ + hash = hash * m + n; \ + } while (0) mix(keyp->target_class); mix(keyp->target_type); |