kernel: Sanitize if else statement according with MISRA-C
A final else statement must be provided when an if statement is followed by one or more else if. MISRA-C rule 15.7 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
0b14866437
commit
3e97acc7f2
2 changed files with 4 additions and 0 deletions
|
@ -151,6 +151,8 @@ static int mbox_message_match(struct k_mbox_msg *tx_msg,
|
|||
rx_msg->tx_block.data = NULL;
|
||||
} else if (rx_msg->tx_block.data != NULL) {
|
||||
rx_msg->tx_data = rx_msg->tx_block.data;
|
||||
} else {
|
||||
/* no data */
|
||||
}
|
||||
|
||||
/* update syncing thread field for receiver only */
|
||||
|
|
|
@ -536,6 +536,8 @@ int _k_object_validate(struct _k_object *ko, enum k_objects otype,
|
|||
if (unlikely(ko->flags & K_OBJ_FLAG_INITIALIZED)) {
|
||||
return -EADDRINUSE;
|
||||
}
|
||||
} else {
|
||||
/* _OBJ_INIT_ANY */
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue