Attention is currently required from: Nico Huber, Xiang W, Angel Pons. Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55115 )
Change subject: programmer_table: remove NULL termination ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
in libflashrom.c used {0} object. It is need remove in this patch.
int flashrom_programmer_init(struct flashrom_programmer **const flashprog, const char *const prog_name, const char *const prog_param) { unsigned prog;
for (prog = 0; prog < PROGRAMMER_INVALID; prog++) { if (strcmp(prog_name, programmer_table[prog].name) == 0) break; } if (prog >= PROGRAMMER_INVALID) { msg_ginfo("Error: Unknown programmer "%s". Valid choices are:\n", prog_name); list_programmers_linebreak(0, 80, 0); return 1; } return programmer_init(prog, prog_param); }
The patch removes programmer_table[PROGRAMMER_INVALID] = {0}. So programmer_table[PROGRAMMER_INVALID] is now UNDEFINED. The flashrom_programmer_init() function will never access programmer_table[PROGRAMMER_INVALID].