mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: nvramcui: Declare variable outside for loop
Make the code C89 compatible, which doesnt allow loop initial
declarations. Older compilers use C89 by default, so just declare the
variable outside.
BUG=none
BRANCH=none
TEST=none
Change-Id: If89c5f7ab563e8acde3150c57611a432d72509dd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e7385d14b1
Original-Change-Id: I3c5a8109e66f7a25687f4e4b2c72718d74276e04
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/18196
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/431984
This commit is contained in:
parent
3dab3f6fb0
commit
6f9410cd74
1 changed files with 4 additions and 2 deletions
|
@ -90,8 +90,9 @@ static void cmos_walk_options(struct cb_cmos_option_table *opttbl,
|
|||
FIELD **fields, int numopts, int maxlength)
|
||||
{
|
||||
struct cb_cmos_entries *option = first_cmos_entry(opttbl);
|
||||
int i;
|
||||
|
||||
for (int i = 0; i < numopts; i++) {
|
||||
for (i = 0; i < numopts; i++) {
|
||||
while ((option->config == 'r') ||
|
||||
(strcmp("check_sum", (char *)option->name) == 0)) {
|
||||
option = next_cmos_entry(option);
|
||||
|
@ -173,6 +174,7 @@ static void cmos_walk_options(struct cb_cmos_option_table *opttbl,
|
|||
int main(void)
|
||||
{
|
||||
int ch, done;
|
||||
int i;
|
||||
|
||||
/* coreboot data structures */
|
||||
lib_get_sysinfo();
|
||||
|
@ -268,7 +270,7 @@ int main(void)
|
|||
|
||||
endwin();
|
||||
|
||||
for (int i = 0; i < numopts; i++) {
|
||||
for (i = 0; i < numopts; i++) {
|
||||
char *name = field_buffer(fields[2 * i], 0);
|
||||
char *value = field_buffer(fields[2 * i + 1], 0);
|
||||
char *ptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue