1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

macro: remove double evaluation in FLAGS_SET()

This commit is contained in:
Lennart Poettering 2018-11-16 21:04:38 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent bca89fe84d
commit 222c8d4e22

View File

@ -383,7 +383,7 @@ static inline int __coverity_check__(int condition) {
#define SET_FLAG(v, flag, b) \ #define SET_FLAG(v, flag, b) \
(v) = (b) ? ((v) | (flag)) : ((v) & ~(flag)) (v) = (b) ? ((v) | (flag)) : ((v) & ~(flag))
#define FLAGS_SET(v, flags) \ #define FLAGS_SET(v, flags) \
(((v) & (flags)) == (flags)) ((~(v) & (flags)) == 0)
#define CASE_F(X) case X: #define CASE_F(X) case X:
#define CASE_F_1(CASE, X) CASE_F(X) #define CASE_F_1(CASE, X) CASE_F(X)