lib: os: add final else where missing in onoff, p4wq, sem

onoff, p4wq, and sem had several places missing final else
statement in the if else if construct. This commit adds
else {} to comply with coding guideline 15.7.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
This commit is contained in:
Jennifer Williams 2021-04-28 10:56:06 -07:00 committed by Anas Nashif
commit be5a3777ca
3 changed files with 8 additions and 1 deletions

View file

@ -222,6 +222,8 @@ static int process_recheck(struct onoff_manager *mgr)
} else if ((state == ONOFF_STATE_ERROR)
&& !sys_slist_is_empty(&mgr->clients)) {
evt = EVT_RESET;
} else {
;
}
return evt;
@ -406,6 +408,8 @@ static void process_event(struct onoff_manager *mgr,
} else if ((mgr->flags & ONOFF_FLAG_RECHECK) != 0) {
mgr->flags &= ~ONOFF_FLAG_RECHECK;
evt = EVT_RECHECK;
} else {
;
}
state = mgr->flags & ONOFF_STATE_MASK;

View file

@ -63,6 +63,8 @@ static inline bool item_lessthan(struct k_p4wq_work *a, struct k_p4wq_work *b)
} else if ((a->priority == b->priority) &&
(a->deadline != b->deadline)) {
return a->deadline - b->deadline > 0;
} else {
;
}
return false;
}

View file

@ -74,8 +74,9 @@ int sys_sem_give(struct sys_sem *sem)
}
} else if (old_value >= sem->limit) {
return -EAGAIN;
} else {
;
}
return ret;
}