logging: Make statements evaluate boolean expressions

MISRA-C requires that the if statement has essentially Boolean type.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2019-02-25 16:04:32 -03:00 committed by Andrew Boie
commit f18e632566

View file

@ -169,7 +169,7 @@ extern "C" {
_LOG_INTERNAL_X(_LOG_NARGS_POSTFIX(__VA_ARGS__), \
_src_level, __VA_ARGS__);\
} \
} while (0)
} while (false)
#define _LOG_INTERNAL_0(_src_level, _str) \
log_0(_str, _src_level)