From 9197a44c284468876dbf32353c421123f2bd08b0 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Fri, 19 Aug 2022 00:54:15 +0200 Subject: raiden_debug_spi.c: Retype variable `found` with bool Use the bool type instead of an integer for the variable `found`, since this represents its purpose much better. Signed-off-by: Felix Singer Change-Id: I18c69e678017a9c0655a31c0487fd1fb0d85ecf2 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66877 Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- raiden_debug_spi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'raiden_debug_spi.c') diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c index 161471c1..28cab067 100644 --- a/raiden_debug_spi.c +++ b/raiden_debug_spi.c @@ -343,6 +343,7 @@ #include "usb_device.h" #include +#include #include #include #include @@ -1488,7 +1489,7 @@ static int raiden_debug_spi_init(const struct programmer_cfg *cfg) char *serial = extract_programmer_param_str(cfg, "serial"); struct usb_device *current; struct usb_device *device = NULL; - int found = 0; + bool found = false; int ret; int request_enable = get_target(cfg); @@ -1535,7 +1536,7 @@ static int raiden_debug_spi_init(const struct programmer_cfg *cfg) } if (!serial) { - found = 1; + found = true; goto loop_end; } else { unsigned char dev_serial[32] = { 0 }; @@ -1560,7 +1561,7 @@ static int raiden_debug_spi_init(const struct programmer_cfg *cfg) } else { msg_pinfo("Raiden: Serial number %s matched device", serial); usb_device_show(" ", current); - found = 1; + found = true; } } } -- cgit v1.2.3