Nico Huber submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
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(-)

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) {

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id2ad9630fbc41e98d182768b553788e069fa5095
Gerrit-Change-Number: 55120
Gerrit-PatchSet: 13
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-CC: Xiang W <wxjstz@126.com>
Gerrit-MessageType: merged