diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index ed41d36fe1..8393be3e83 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -73,7 +73,7 @@ #define KEEP_ALIVE_HACK 1 -#ifdef CONFIG_RR_INTERVAL > 0 +#if CONFIG_RR_INTERVAL > 0 # define KEEP_ALIVE_TICKS MSEC2TICK(CONFIG_RR_INTERVAL) #else # define KEEP_ALIVE_TICKS MSEC2TICK(50) @@ -284,7 +284,7 @@ static inline uint32_t sched_process_scheduler(uint32_t ticks, bool noswitches) if (rtcb != ntcb) { - return sched_process_scheduler(0, true) + return sched_process_scheduler(0, true); } /* Returning zero means that there is no interesting event to be timed */ @@ -294,9 +294,9 @@ static inline uint32_t sched_process_scheduler(uint32_t ticks, bool noswitches) { /* Apply the keep alive hack */ - return KEEP_ALIVE_TICKS + return KEEP_ALIVE_TICKS; } -#else +#endif return ret; } diff --git a/sched/sched/sched_unlock.c b/sched/sched/sched_unlock.c index cf14deb503..6ac0ad49ab 100644 --- a/sched/sched/sched_unlock.c +++ b/sched/sched/sched_unlock.c @@ -156,7 +156,7 @@ int sched_unlock(void) * change the currently active task. */ - if (rtcb = (FAR struct tcb_s*)g_readytorun.head) + if (rtcb == (FAR struct tcb_s*)g_readytorun.head) { sched_timer_reassess(); }