aboutsummaryrefslogtreecommitdiffstats
path: root/raiden_debug_spi.c
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-08-19 00:54:15 +0200
committerAnastasia Klimchuk <aklm@chromium.org>2022-09-08 02:02:12 +0000
commit9197a44c284468876dbf32353c421123f2bd08b0 (patch)
tree01f5b149b33857d9817b030c82b94aae8be4f762 /raiden_debug_spi.c
parent2ce2606bd5d1f085bfc176c2ad8e22afaee2103a (diff)
downloadflashrom-9197a44c284468876dbf32353c421123f2bd08b0.tar.gz
flashrom-9197a44c284468876dbf32353c421123f2bd08b0.tar.bz2
flashrom-9197a44c284468876dbf32353c421123f2bd08b0.zip
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 <felixsinger@posteo.net> Change-Id: I18c69e678017a9c0655a31c0487fd1fb0d85ecf2 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66877 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'raiden_debug_spi.c')
-rw-r--r--raiden_debug_spi.c7
1 files changed, 4 insertions, 3 deletions
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 <libusb.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -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;
}
}
}