summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 10681307cf..9438aa312b 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -1516,14 +1516,17 @@ int config_parse_unit_condition_string(
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 (!(c = condition_new(cond, rvalue, trigger, negate)))
- return -ENOMEM;
+ c = condition_new(cond, rvalue, trigger, negate);
+ if (!c)
+ return log_oom();
LIST_PREPEND(Condition, conditions, u->conditions, c);
return 0;