summaryrefslogtreecommitdiff
path: root/tools/intel_bios_reader.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-09 23:11:58 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-09 23:38:29 +0100
commit24a33db7f0177e3c0d7cc4686a69ae6e30e09c3b (patch)
treeebe0fca47636bc50a849341a37b33c0583896cc8 /tools/intel_bios_reader.c
parent74b70baf14e42ee435a4e317c20a41d3fb0f0d93 (diff)
tools/intel_bios_reader: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tools/intel_bios_reader.c')
-rw-r--r--tools/intel_bios_reader.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index fc60a0bb..d7322b57 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -78,12 +78,12 @@ static struct bdb_block *find_section(int section_id)
{
struct bdb_block *block;
unsigned char *base = (unsigned char *)bdb;
- int index = 0;
+ int idx = 0;
uint16_t total, current_size;
unsigned char current_id;
/* skip to first section */
- index += bdb->header_size;
+ idx += bdb->header_size;
total = bdb->bdb_size;
block = malloc(sizeof(*block));
@@ -93,18 +93,18 @@ static struct bdb_block *find_section(int section_id)
}
/* walk the sections looking for section_id */
- while (index < total) {
- current_id = *(base + index);
- index++;
- current_size = *((uint16_t *) (base + index));
- index += 2;
+ while (idx < total) {
+ current_id = *(base + idx);
+ idx++;
+ current_size = *((uint16_t *) (base + idx));
+ idx += 2;
if (current_id == section_id) {
block->id = current_id;
block->size = current_size;
- block->data = base + index;
+ block->data = base + idx;
return block;
}
- index += current_size;
+ idx += current_size;
}
free(block);
@@ -829,7 +829,7 @@ int main(int argc, char **argv)
int fd;
struct vbt_header *vbt = NULL;
int vbt_off, bdb_off, i;
- char *filename = "bios";
+ const char *filename = "bios";
struct stat finfo;
struct bdb_block *block;
char signature[17];