aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfstool.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-05-15 09:14:09 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-05-17 16:05:08 +0200
commit2e0425986fb1b5d4d5b57b2e2b7f5442e9823b0c (patch)
tree4d3596c9aa875452a319247f92af5db9f8236eb8 /util/cbfstool/cbfstool.c
parent2f7e56f2d6b8292258e18e70f0205d9aff097b57 (diff)
cbfstool: Fix shadowed global index
Change-Id: Ic8bccea1f2ddef874d8e440fa4fa05de1d4f9550 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/10210 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/cbfstool/cbfstool.c')
-rw-r--r--util/cbfstool/cbfstool.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index fd0ff35cf0..68a83e7b40 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -500,8 +500,8 @@ static int cbfs_layout(void)
printf("This image contains the following sections that can be %s with this tool:\n",
param.show_immutable ? "accessed" : "manipulated");
puts("");
- for (unsigned index = 0; index < fmap->nareas; ++index) {
- const struct fmap_area *current = fmap->areas + index;
+ for (unsigned i = 0; i < fmap->nareas; ++i) {
+ const struct fmap_area *current = fmap->areas + i;
bool readonly = partitioned_file_fmap_count(param.image_file,
partitioned_file_fmap_select_children_of, current) ||
@@ -520,10 +520,10 @@ static int cbfs_layout(void)
// of tree that had duplicate lists in addition to child lists,
// which would allow covering that weird, unlikely case as well.
unsigned lookahead;
- for (lookahead = 1; index + lookahead < fmap->nareas;
+ for (lookahead = 1; i + lookahead < fmap->nareas;
++lookahead) {
const struct fmap_area *consecutive =
- fmap->areas + index + lookahead;
+ fmap->areas + i + lookahead;
if (consecutive->offset != current->offset ||
consecutive->size != current->size)
break;
@@ -539,7 +539,7 @@ static int cbfs_layout(void)
qualifier = "CBFS, ";
printf(" (%ssize %u)\n", qualifier, current->size);
- index += lookahead - 1;
+ i += lookahead - 1;
}
puts("");