summaryrefslogtreecommitdiff
path: root/src/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-09-21 00:44:51 +0200
committerLennart Poettering <lennart@poettering.net>2011-09-21 00:50:40 +0200
commitab7f148f81723ef18402b78ea34fb5e1bbe85ff0 (patch)
tree17abf5deacc32bdcbb55843e0e02f179e0c6fa84 /src/load-fragment.c
parent418112a296e898cbd7fe8585995ae60936368327 (diff)
unit: introduce ConditionPathIsMountPoint=
Diffstat (limited to 'src/load-fragment.c')
-rw-r--r--src/load-fragment.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/load-fragment.c b/src/load-fragment.c
index c8b4b5a9c6..c7d2da34b4 100644
--- a/src/load-fragment.c
+++ b/src/load-fragment.c
@@ -1545,10 +1545,12 @@ int config_parse_unit_condition_path(
assert(rvalue);
assert(data);
- if ((trigger = rvalue[0] == '|'))
+ trigger = rvalue[0] == '|';
+ if (trigger)
rvalue++;
- if ((negate = rvalue[0] == '!'))
+ negate = rvalue[0] == '!';
+ if (negate)
rvalue++;
if (!path_is_absolute(rvalue)) {
@@ -1556,7 +1558,8 @@ int config_parse_unit_condition_path(
return 0;
}
- if (!(c = condition_new(cond, rvalue, trigger, negate)))
+ c = condition_new(cond, rvalue, trigger, negate);
+ if (!c)
return -ENOMEM;
LIST_PREPEND(Condition, conditions, u->meta.conditions, c);