kernel: Using boolean expression on ASSERT macros

ASSERT macro expects a boolean expression, making it
explicit.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-09-18 12:40:54 -07:00 committed by Anas Nashif
commit d8837c6888
7 changed files with 18 additions and 16 deletions

View file

@ -83,7 +83,7 @@ static inline int clock_control_get_rate(struct device *dev,
{
const struct clock_control_driver_api *api = dev->driver_api;
__ASSERT(api->get_rate, "%s not implemented for device %s",
__ASSERT(api->get_rate != NULL, "%s not implemented for device %s",
__func__, dev->config->name);
return api->get_rate(dev, sys, rate);