Edward O'Callaghan submitted this change.

View Change


Approvals: build bot (Jenkins): Verified Anastasia Klimchuk: Looks good to me, approved Evan Benn: Looks good to me, but someone else must approve
tests/selfcheck.c: Fix on non-x86 machines

The global const of `board_matches_size` has value `1` on non-x86
machines. Therefore strictly greater than zero is correct.

Change-Id: Icbe677d3ef164e998daf898ddbea34f96246677f
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70554
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Evan Benn <evanbenn@google.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
---
M tests/selfcheck.c
1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/tests/selfcheck.c b/tests/selfcheck.c
index aeccf18..e235d8e 100644
--- a/tests/selfcheck.c
+++ b/tests/selfcheck.c
@@ -139,7 +139,7 @@

size_t i;

- assert_true(board_matches_size > 1);
+ assert_true(board_matches_size > 0);
assert_true(board_matches[board_matches_size - 1].vendor_name == NULL);
for (i = 0; i < board_matches_size - 1; i++) {
const struct board_match *b = &board_matches[i];

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Icbe677d3ef164e998daf898ddbea34f96246677f
Gerrit-Change-Number: 70554
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Evan Benn <evanbenn@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus@gmail.com>
Gerrit-MessageType: merged