summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-12-12 19:51:41 +0100
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-12-12 21:57:44 +0100
commitabc08d4d08006fa19dec645859f81af9f227339e (patch)
tree4980fba6b1e27bf9d625350b89281a3c0814c78c /src/core/load-fragment.c
parent308b57107606818431d3bff83e346eeab2f21e6a (diff)
wrap a few *_FOREACH macros in curly braces
cppcheck would give up with "syntax error" without them. This led to reports of syntax errors in unrelated locations and potentially hid other errors
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 3fbe680cf0..8e5be8731f 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -3586,7 +3586,7 @@ int unit_load_fragment(Unit *u) {
return r;
/* Try to find an alias we can load this with */
- if (u->load_state == UNIT_STUB)
+ if (u->load_state == UNIT_STUB) {
SET_FOREACH(t, u->names, i) {
if (t == u->id)
@@ -3599,6 +3599,7 @@ int unit_load_fragment(Unit *u) {
if (u->load_state != UNIT_STUB)
break;
}
+ }
/* And now, try looking for it under the suggested (originally linked) path */
if (u->load_state == UNIT_STUB && u->fragment_path) {
@@ -3628,7 +3629,7 @@ int unit_load_fragment(Unit *u) {
if (r < 0)
return r;
- if (u->load_state == UNIT_STUB)
+ if (u->load_state == UNIT_STUB) {
SET_FOREACH(t, u->names, i) {
_cleanup_free_ char *z = NULL;
@@ -3646,6 +3647,7 @@ int unit_load_fragment(Unit *u) {
if (u->load_state != UNIT_STUB)
break;
}
+ }
}
return 0;