diff --git a/src/scheduler.cc/samples/fifo/check.c b/src/scheduler.cc/samples/fifo/check.c index f82e3cb..22a4df6 100644 --- a/src/scheduler.cc/samples/fifo/check.c +++ b/src/scheduler.cc/samples/fifo/check.c @@ -362,9 +362,10 @@ sch_resource_t dynamic_avail(resource *res) { if (res -> max == INFINITY && res -> avail == UNSPECIFIED) return INFINITY; + if (res -> avail == UNSPECIFIED) + return res -> max; else - return (res -> avail == UNSPECIFIED ? - (res -> max - res -> assigned) : (res -> avail - res -> assigned)); + return res -> avail - res -> assigned; } /*