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:
parent
9517b87d35
commit
be5a3777ca
3 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -74,8 +74,9 @@ int sys_sem_give(struct sys_sem *sem)
|
|||
}
|
||||
} else if (old_value >= sem->limit) {
|
||||
return -EAGAIN;
|
||||
} else {
|
||||
;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue