From: Marc Schink Date: Wed, 1 Jul 2020 08:27:19 +0000 (+0200) Subject: flash/nor/w600: Use 'bool' data type X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=327d18220ffb005884a742992657b6b5a4be2232;p=fw%2Fopenocd flash/nor/w600: Use 'bool' data type Change-Id: Ia71ffba82b23ed1860acc5daf6c66fa574a0d797 Signed-off-by: Marc Schink Reviewed-on: http://openocd.zylin.com/5751 Tested-by: jenkins Reviewed-by: Antonio Borneo --- diff --git a/src/flash/nor/w600.c b/src/flash/nor/w600.c index ce3bc6e99..714b27db2 100644 --- a/src/flash/nor/w600.c +++ b/src/flash/nor/w600.c @@ -87,7 +87,7 @@ static const struct w600_flash_param w600_param[] = { }; struct w600_flash_bank { - int probed; + bool probed; uint32_t id; const struct w600_flash_param *param; @@ -107,7 +107,7 @@ FLASH_BANK_COMMAND_HANDLER(w600_flash_bank_command) w600_info = malloc(sizeof(struct w600_flash_bank)); bank->driver_priv = w600_info; - w600_info->probed = 0; + w600_info->probed = false; w600_info->register_base = QFLASH_REGBASE; w600_info->user_bank_size = bank->size; @@ -287,7 +287,7 @@ static int w600_probe(struct flash_bank *bank) uint32_t flash_id; size_t i; - w600_info->probed = 0; + w600_info->probed = false; /* read stm32 device id register */ int retval = w600_get_flash_id(bank, &flash_id); @@ -351,7 +351,7 @@ static int w600_probe(struct flash_bank *bank) bank->sectors[i].is_protected = (i < W600_FLASH_PROTECT_SIZE / W600_FLASH_SECSIZE); } - w600_info->probed = 1; + w600_info->probed = true; return ERROR_OK; }