mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-28 07:23:43 +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:
parent
dd8b8d5289
commit
4bb086423c
@ -1582,7 +1582,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
|
|||||||
const char *pname;
|
const char *pname;
|
||||||
int pnamelen;
|
int pnamelen;
|
||||||
int remaining = 0, firstline = 1;
|
int remaining = 0, firstline = 1;
|
||||||
enum programmer p;
|
size_t p;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (p = 0; p < programmer_table_size; p++) {
|
for (p = 0; p < programmer_table_size; p++) {
|
||||||
|
@ -119,7 +119,7 @@ const char *flashrom_version_info(void)
|
|||||||
*/
|
*/
|
||||||
const char **flashrom_supported_programmers(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*));
|
const char **supported_programmers = malloc((programmer_table_size + 1) * sizeof(char*));
|
||||||
|
|
||||||
if (supported_programmers != NULL) {
|
if (supported_programmers != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user