]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/unit.c
tree-wide: use IN_SET macro (#6977)
[thirdparty/systemd.git] / src / core / unit.c
index 2b7c7738fe7d056a13c7e4d08647eb7593d3e183..357306dce836c9413b3486a4d2fa949571c600ee 100644 (file)
@@ -3647,7 +3647,7 @@ int unit_kill_common(
                         return -ENOMEM;
 
                 q = cg_kill_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, signo, 0, pid_set, NULL, NULL);
-                if (q < 0 && q != -EAGAIN && q != -ESRCH && q != -ENOENT)
+                if (q < 0 && !IN_SET(q, -EAGAIN, -ESRCH, -ENOENT))
                         r = q;
                 else
                         killed = true;
@@ -4179,7 +4179,7 @@ int unit_kill_context(
                                       pid_set,
                                       log_func, u);
                 if (r < 0) {
-                        if (r != -EAGAIN && r != -ESRCH && r != -ENOENT)
+                        if (!IN_SET(r, -EAGAIN, -ESRCH, -ENOENT))
                                 log_unit_warning_errno(u, r, "Failed to kill control group %s, ignoring: %m", u->cgroup_path);
 
                 } else if (r > 0) {