summaryrefslogtreecommitdiff
path: root/util/cbfstool
diff options
context:
space:
mode:
authorMyles Watsonmylesgw <Myles Watsonmylesgw@gmail.com>2009-05-13 02:48:58 +0000
committerMyles Watson <mylesgw@gmail.com>2009-05-13 02:48:58 +0000
commit4b35354d399d4ee201cd8f652335d8e1b1a79f7b (patch)
tree119fe27231dc3274d75f0f8c3bb755c5d2b19df7 /util/cbfstool
parent5f0482dd8b06ab4220ff2c1474008afc94481854 (diff)
downloadcoreboot-4b35354d399d4ee201cd8f652335d8e1b1a79f7b.tar.xz
Remove a shadowed variable and an unnecessary local variable in cbfstool/fs.c.
It is nearly trivial. Signed-off-by: Myles Watson<mylesgw@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4279 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/cbfstool')
-rw-r--r--util/cbfstool/fs.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/util/cbfstool/fs.c b/util/cbfstool/fs.c
index 536804c30e..f617159563 100644
--- a/util/cbfstool/fs.c
+++ b/util/cbfstool/fs.c
@@ -103,7 +103,6 @@ struct cbfs_file * rom_alloc(struct rom *rom, const char *name, unsigned long si
struct cbfs_file *c = NULL;
unsigned long nextoffset, truncoffset;
struct cbfs_file *newfile = NULL;
- unsigned int csize;
while (offset < rom->fssize) {
@@ -150,11 +149,9 @@ struct cbfs_file * rom_alloc(struct rom *rom, const char *name, unsigned long si
c->len = htonl(size);
- csize = headersize(name);
-
strcpy(c->magic, COMPONENT_MAGIC);
- c->offset = htonl(csize);
+ c->offset = htonl(headersize(name));
c->type = htonl(type);
@@ -249,7 +246,6 @@ int rom_remove(struct rom *rom, const char *name)
int rom_extract(struct rom *rom, const char *name, void** buf, int *size )
{
struct cbfs_file *c = rom_find_by_name(rom, name);
- unsigned int csize;
if (c == NULL) {
ERROR("Component %s does not exist\n", name);
@@ -257,9 +253,7 @@ int rom_extract(struct rom *rom, const char *name, void** buf, int *size )
}
*size = ntohl(c->len);
-
- csize = headersize(name);
- *buf = ((unsigned char *)c) + csize;
+ *buf = ((unsigned char *)c) + headersize(name);
return 0;
}