From 0460367a70d64e69ea756873ef1d1f51a90cce98 Mon Sep 17 00:00:00 2001 From: zhuyanlin Date: Thu, 17 Mar 2022 14:58:51 +0800 Subject: [PATCH] irq_csection: fix assert warning constant 65535 with expression of type 'int16_t' (aka 'short') is always true Signed-off-by: zhuyanlin --- sched/irq/irq_csection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */