Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/55120 )
Change subject: flashrom.c libflashrom.c: replace enum programmer with size_t ......................................................................
flashrom.c libflashrom.c: replace enum programmer with size_t
Using size_t since programmer_table_size uses ARRAY_SIZE which returns size_t.
Change-Id: Id2ad9630fbc41e98d182768b553788e069fa5095 Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.de Reviewed-on: https://review.coreboot.org/c/flashrom/+/55120 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M flashrom.c M libflashrom.c 2 files changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/flashrom.c b/flashrom.c index 0476b3d..9a7fb18 100644 --- a/flashrom.c +++ b/flashrom.c @@ -1582,7 +1582,7 @@ const char *pname; int pnamelen; int remaining = 0, firstline = 1; - enum programmer p; + size_t p; int i;
for (p = 0; p < programmer_table_size; p++) { diff --git a/libflashrom.c b/libflashrom.c index f3df1c7..1a8b051 100644 --- a/libflashrom.c +++ b/libflashrom.c @@ -119,7 +119,7 @@ */ const char **flashrom_supported_programmers(void) { - enum programmer p = 0; + size_t p = 0; const char **supported_programmers = malloc((programmer_table_size + 1) * sizeof(char*));
if (supported_programmers != NULL) {