summaryrefslogtreecommitdiff
path: root/src/core/dynamic-user.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/core/dynamic-user.c
parent01a65d4180446661732d90d23a24ab692d279295 (diff)
downloadsystemd-3742095b27f8df4b195d530b52d15bc5fea70bf1.tar.gz
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/core/dynamic-user.c')
-rw-r--r--src/core/dynamic-user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c
index 9b0dbaf248..6358fcba02 100644
--- a/src/core/dynamic-user.c
+++ b/src/core/dynamic-user.c
@@ -221,7 +221,7 @@ static int pick_uid(const char *name, uid_t *ret_uid) {
r = flock(lock_fd, LOCK_EX|LOCK_NB); /* Try to get a BSD file lock on the UID lock file */
if (r < 0) {
- if (errno == EBUSY || errno == EAGAIN)
+ if (IN_SET(errno, EBUSY, EAGAIN))
goto next; /* already in use */
return -errno;