From 0c3207e86ede19592e6950b11b7cd01f917d6658 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 16 Nov 2016 21:48:27 -0600 Subject: [PATCH] Fix backward logic in an assertion. --- sched/irq/irq_csection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c index b217aa33bd..6dadf92559 100644 --- a/sched/irq/irq_csection.c +++ b/sched/irq/irq_csection.c @@ -166,7 +166,7 @@ irqstate_t enter_critical_section(void) * the spinlock. */ - DEBUGASSERT((g_cpu_irqset & (1 << this_cpu())) != 0); /* Really requires g_cpu_irqsetlock */ + DEBUGASSERT((g_cpu_irqset & (1 << this_cpu())) == 0); /* Really requires g_cpu_irqsetlock */ spin_lock(&g_cpu_irqset); /* The set the lock count to 1. @@ -261,7 +261,7 @@ void leave_critical_section(irqstate_t flags) else { FAR struct tcb_s *rtcb = this_task(); - DEBUGASSERT(rtcb != 0 && rtcb->irqcount > 0); + DEBUGASSERT(rtcb != NULL && rtcb->irqcount > 0); /* Normal tasking context. We need to coordinate with other * tasks.