summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-16 21:04:38 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-11-17 08:45:24 +0100
commit222c8d4e22957fb12a3ea39e1283ecfc46139569 (patch)
tree74e8eabae14f43fc952ad6a3a39a49c923385719
parentrc-local-generator: add comment explaining the background of the generator (diff)
downloadsystemd-222c8d4e22957fb12a3ea39e1283ecfc46139569.tar.xz
systemd-222c8d4e22957fb12a3ea39e1283ecfc46139569.zip
macro: remove double evaluation in FLAGS_SET()
-rw-r--r--src/basic/macro.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h
index ae88fa5b93..00fb3212db 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -383,7 +383,7 @@ static inline int __coverity_check__(int condition) {
#define SET_FLAG(v, flag, b) \
(v) = (b) ? ((v) | (flag)) : ((v) & ~(flag))
#define FLAGS_SET(v, flags) \
- (((v) & (flags)) == (flags))
+ ((~(v) & (flags)) == 0)
#define CASE_F(X) case X:
#define CASE_F_1(CASE, X) CASE_F(X)