summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 26e7fd24de..71cdf2dfc8 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -265,7 +265,8 @@ int socket_add_one_mount_link(Socket *s, Mount *m) {
if (!socket_needs_mount(s, m->where))
return 0;
- if ((r = unit_add_two_dependencies(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true)) < 0)
+ r = unit_add_two_dependencies(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true);
+ if (r < 0)
return r;
return 0;
@@ -277,9 +278,11 @@ static int socket_add_mount_links(Socket *s) {
assert(s);
- LIST_FOREACH(units_by_type, other, UNIT(s)->manager->units_by_type[UNIT_MOUNT])
- if ((r = socket_add_one_mount_link(s, MOUNT(other))) < 0)
+ LIST_FOREACH(units_by_type, other, UNIT(s)->manager->units_by_type[UNIT_MOUNT]) {
+ r = socket_add_one_mount_link(s, MOUNT(other));
+ if (r < 0)
return r;
+ }
return 0;
}