From 8f643e6e199d8fb0f5ea0abff143b4100c551e32 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Wed, 28 Apr 2021 17:10:54 +0200 Subject: [PATCH] ustate_found(): support non local requirements. Prepare for universal_fulfills_requirement() checking any sort of requirement against a unit state universal. See osdn #42099 --- common/requirements.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/requirements.c b/common/requirements.c index 5d9bedbc96..c2c8618004 100644 --- a/common/requirements.c +++ b/common/requirements.c @@ -5001,7 +5001,9 @@ static enum req_item_found output_type_found(const struct requirement *preq, static enum req_item_found ustate_found(const struct requirement *preq, const struct universal *source) { - fc_assert_ret_val(preq->range == REQ_RANGE_LOCAL, ITF_NOT_APPLICABLE); + if (preq->range != REQ_RANGE_LOCAL) { + return ITF_NOT_APPLICABLE; + } if (preq->source.kind == VUT_UNITSTATE) { switch (source->value.unit_state) { -- 2.30.2