Nico Huber submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
programmer_table: remove null termination

The {0} object at the end of programmer_table which corresponds
to PROGRAMMER_INVALID has no use in current code.

Change-Id: Ib63c2d2941f23a0788e26e5a5feb25d8669acb42
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/55115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
---
M flashrom.c
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/flashrom.c b/flashrom.c
index 0af5057..65f7e73 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -532,8 +532,6 @@
.delay = internal_delay,
},
#endif
-
- {0}, /* This entry corresponds to PROGRAMMER_INVALID. */
};

#define SHUTDOWN_MAXFN 32
@@ -2191,7 +2189,7 @@
/* Safety check. Instead of aborting after the first error, check
* if more errors exist.
*/
- if (ARRAY_SIZE(programmer_table) - 1 != PROGRAMMER_INVALID) {
+ if (ARRAY_SIZE(programmer_table) != PROGRAMMER_INVALID) {
msg_gerr("Programmer table miscompilation!\n");
ret = 1;
}

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib63c2d2941f23a0788e26e5a5feb25d8669acb42
Gerrit-Change-Number: 55115
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Xiang W <wxjstz@126.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-MessageType: merged