selinux: avoid extra semicolon
Wrap macro into `do { } while (0)` to avoid Clang emitting warnings
about extra semicolons.
Similar to userspace commit
9d85aa60d1
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: whitespace/indenting tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
Родитель
759205151c
Коммит
1d4e8036cb
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче