summaryrefslogtreecommitdiffstats
path: root/src/core/automount.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/automount.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/core/automount.c')
-rw-r--r--src/core/automount.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 0c92616575..ecaa916ce3 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -804,7 +804,7 @@ static int automount_start(Unit *u) {
int r;
assert(a);
- assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_FAILED);
+ assert(IN_SET(a->state, AUTOMOUNT_DEAD, AUTOMOUNT_FAILED));
if (path_is_mount_point(a->where, NULL, 0) > 0) {
log_unit_error(u, "Path %s is already a mount point, refusing start.", a->where);
@@ -836,7 +836,7 @@ static int automount_stop(Unit *u) {
Automount *a = AUTOMOUNT(u);
assert(a);
- assert(a->state == AUTOMOUNT_WAITING || a->state == AUTOMOUNT_RUNNING);
+ assert(IN_SET(a->state, AUTOMOUNT_WAITING, AUTOMOUNT_RUNNING));
automount_enter_dead(a, AUTOMOUNT_SUCCESS);
return 1;