diff --git a/src/core/unit.c b/src/core/unit.c index e865c393a3b..66ac9c91ec0 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -5079,10 +5079,7 @@ bool unit_type_supported(UnitType t) { static int8_t cache[_UNIT_TYPE_MAX] = {}; /* -1: disabled, 1: enabled: 0: don't know */ int r; - if (_unlikely_(t < 0)) - return false; - if (_unlikely_(t >= _UNIT_TYPE_MAX)) - return false; + assert(t >= 0 && t < _UNIT_TYPE_MAX); if (cache[t] == 0) { char *e;