irq_csection: fix assert warning

constant 65535 with expression of type 'int16_t' (aka 'short')
is always true

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
This commit is contained in:
zhuyanlin 2022-03-17 14:58:51 +08:00 committed by Xiang Xiao
parent 7619d2a6f9
commit 0460367a70
1 changed files with 1 additions and 1 deletions

View File

@ -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 */