programmer_table: replace PROGRAMMER_INVALID with programmer_table_size
Change-Id: Icaaeefe001de604df9d7fdd06f05a5ed39fdbd84
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/55117
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71374
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/cli_classic.c b/cli_classic.c
index 89a6c83..5ebc6ea 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -306,7 +306,7 @@
"with \",\". Please see the man page "
"for details.\n");
}
- for (prog = 0; prog < PROGRAMMER_INVALID; prog++) {
+ for (prog = 0; prog < programmer_table_size; prog++) {
name = programmer_table[prog]->name;
namelen = strlen(name);
if (strncmp(optarg, name, namelen) == 0) {