summaryrefslogtreecommitdiff
path: root/src/test/test-cgroup-util.c
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2017-09-29 09:58:22 +0200
committerAndreas Rammhold <andreas@rammhold.de>2017-10-02 13:09:56 +0200
commitec2ce0c5d7623c83dabf50c98253f5b0c0fb1359 (patch)
tree2be64c5b07a1c2cde8c2244a78b5e4c5e125e4b9 /src/test/test-cgroup-util.c
parent3742095b27f8df4b195d530b52d15bc5fea70bf1 (diff)
downloadsystemd-ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359.tar.gz
tree-wide: use `!IN_SET(..)` for `a != b && a != c && …`
The included cocci was used to generate the changes. Thanks to @flo-wer for pointing this case out.
Diffstat (limited to 'src/test/test-cgroup-util.c')
-rw-r--r--src/test/test-cgroup-util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c
index 30cd463722..d5bc73feff 100644
--- a/src/test/test-cgroup-util.c
+++ b/src/test/test-cgroup-util.c
@@ -192,8 +192,7 @@ static void test_proc(void) {
pid_t pid;
uid_t uid = UID_INVALID;
- if (de->d_type != DT_DIR &&
- de->d_type != DT_UNKNOWN)
+ if (!IN_SET(de->d_type, DT_DIR, DT_UNKNOWN))
continue;
r = parse_pid(de->d_name, &pid);