summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.de>2021-05-19 13:05:36 +0200
committerNico Huber <nico.h@gmx.de>2021-06-09 15:44:05 +0000
commit9cf3f8925b0a8029bad68717865c11211d3938dd (patch)
treebaf0896c93ec828f31bff01b53b03bfd54fda274
parent4332e7c04ec460472ed18792638f67cc44e6054c (diff)
downloadflashrom-9cf3f8925b0a8029bad68717865c11211d3938dd.tar.gz
flashrom-9cf3f8925b0a8029bad68717865c11211d3938dd.tar.bz2
flashrom-9cf3f8925b0a8029bad68717865c11211d3938dd.zip
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>
-rw-r--r--flashrom.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/flashrom.c b/flashrom.c
index 0af505757..65f7e73b2 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -532,8 +532,6 @@ const struct programmer_entry programmer_table[] = {
.delay = internal_delay,
},
#endif
-
- {0}, /* This entry corresponds to PROGRAMMER_INVALID. */
};
#define SHUTDOWN_MAXFN 32
@@ -2191,7 +2189,7 @@ int selfcheck(void)
/* 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;
}