Let's only assign boolean values to a boolean variable.
Unit's condition_result is not of type ConditionResult, slightly
confusingly. Let's hence not assign one of ConditionResult's values to
it, but simple booleans.
This effectively doesn't make a difference, since CONDITION_ERROR is
true when cast to bool. But it's still ugly to rely on that. And
confusing.
r = manager_get_effective_environment(u->manager, &env);
if (r < 0) {
log_unit_error_errno(u, r, "Failed to determine effective environment: %m");
- u->condition_result = CONDITION_ERROR;
+ u->condition_result = true;
} else
u->condition_result = condition_test_list(
u->conditions,