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:
Flavio Ceolin 2018-09-25 11:24:28 -07:00 committed by Anas Nashif
commit 3e97acc7f2
2 changed files with 4 additions and 0 deletions

View file

@ -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 */

View file

@ -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;