1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

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>
This commit is contained in:
Thomas Heijligen 2021-06-01 14:25:01 +02:00 committed by Nico Huber
parent dd8b8d5289
commit 4bb086423c
2 changed files with 2 additions and 2 deletions

View File

@ -1582,7 +1582,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
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++) {

View File

@ -119,7 +119,7 @@ const char *flashrom_version_info(void)
*/
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) {