diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c index f922fd1681..e33f441cfe 100644 --- a/sched/irq/irq_csection.c +++ b/sched/irq/irq_csection.c @@ -414,7 +414,7 @@ irqstate_t enter_critical_section(void) * call to enter_critical_section. */ - DEBUGASSERT(rtcb->irqcount >= 0 && rtcb->irqcount < UINT16_MAX); + DEBUGASSERT(rtcb->irqcount >= 0 && rtcb->irqcount < INT16_MAX); if (++rtcb->irqcount == 1) { /* Note that we have entered the critical section */