Anastasia Klimchuk submitted this change.

View Change


Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
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>
---
M raiden_debug_spi.c
1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c
index 161471c..28cab06 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 @@
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 @@
}

if (!serial) {
- found = 1;
+ found = true;
goto loop_end;
} else {
unsigned char dev_serial[32] = { 0 };
@@ -1560,7 +1561,7 @@
} else {
msg_pinfo("Raiden: Serial number %s matched device", serial);
usb_device_show(" ", current);
- found = 1;
+ found = true;
}
}
}

To view, visit change 66877. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I18c69e678017a9c0655a31c0487fd1fb0d85ecf2
Gerrit-Change-Number: 66877
Gerrit-PatchSet: 17
Gerrit-Owner: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged