diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2017-09-29 00:37:23 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-09-29 00:37:23 +0200 |
commit | a4488a7509a96d8b9f0d7793517a217c70ac0361 (patch) | |
tree | b7e4afb30d283f580ba35d37290bcf22a124a091 /src/shared/clean-ipc.c | |
parent | 471b87cc6c159bafd11023e009fc43aa73812b5f (diff) |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c index 3b4231827..3b1c2bd84 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, |