summaryrefslogtreecommitdiffstats
path: root/src/shared/clean-ipc.c
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2017-09-29 00:37:23 +0200
committerAndreas Rammhold <andreas@rammhold.de>2017-10-02 13:09:54 +0200
commit3742095b27f8df4b195d530b52d15bc5fea70bf1 (patch)
tree3fc7c3503845b733f1d58366436c0bb672d3613a /src/shared/clean-ipc.c
parentman: move non-target units together (#6934) (diff)
downloadsystemd-3742095b27f8df4b195d530b52d15bc5fea70bf1.tar.xz
systemd-3742095b27f8df4b195d530b52d15bc5fea70bf1.zip
tree-wide: use IN_SET where possible
In addition to the changes from #6933 this handles cases that could be matched with the included cocci file.
Diffstat (limited to 'src/shared/clean-ipc.c')
-rw-r--r--src/shared/clean-ipc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c
index f59f6f23ae..3e246a1dca 100644
--- a/src/shared/clean-ipc.c
+++ b/src/shared/clean-ipc.c
@@ -95,7 +95,7 @@ static int clean_sysvipc_shm(uid_t delete_uid, gid_t delete_gid) {
if (shmctl(shmid, IPC_RMID, NULL) < 0) {
/* Ignore entries that are already deleted */
- if (errno == EIDRM || errno == EINVAL)
+ if (IN_SET(errno, EIDRM, EINVAL))
continue;
ret = log_warning_errno(errno,
@@ -147,7 +147,7 @@ static int clean_sysvipc_sem(uid_t delete_uid, gid_t delete_gid) {
if (semctl(semid, 0, IPC_RMID) < 0) {
/* Ignore entries that are already deleted */
- if (errno == EIDRM || errno == EINVAL)
+ if (IN_SET(errno, EIDRM, EINVAL))
continue;
ret = log_warning_errno(errno,
@@ -200,7 +200,7 @@ static int clean_sysvipc_msg(uid_t delete_uid, gid_t delete_gid) {
if (msgctl(msgid, IPC_RMID, NULL) < 0) {
/* Ignore entries that are already deleted */
- if (errno == EIDRM || errno == EINVAL)
+ if (IN_SET(errno, EIDRM, EINVAL))
continue;
ret = log_warning_errno(errno,