soc: arm: 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 2018-12-17 16:15:20 -08:00 committed by Anas Nashif
commit 359adfc959
9 changed files with 20 additions and 20 deletions

View file

@ -28,7 +28,7 @@ int stm32_gpio_flags_to_conf(int flags, int *pincfg)
int direction = flags & GPIO_DIR_MASK;
int pud = flags & GPIO_PUD_MASK;
if (!pincfg) {
if (pincfg == NULL) {
return -EINVAL;
}
@ -90,7 +90,7 @@ int stm32_gpio_set(u32_t *base, int pin, int value)
int pval = 1 << (pin & 0xf);
if (value) {
if (value != 0) {
gpio->odr |= pval;
} else {
gpio->odr &= ~pval;