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].
--
To view, visit
https://review.coreboot.org/c/flashrom/+/55115
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib63c2d2941f23a0788e26e5a5feb25d8669acb42
Gerrit-Change-Number: 55115
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen
src@posteo.de
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Xiang W
wxjstz@126.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Nico Huber
nico.h@gmx.de
Gerrit-Attention: Xiang W
wxjstz@126.com
Gerrit-Attention: Angel Pons
th3fanbus@gmail.com
Gerrit-Comment-Date: Sat, 05 Jun 2021 18:42:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xiang W
wxjstz@126.com
Gerrit-MessageType: comment