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
This commit is contained in:
parent
5f0482dd8b
commit
4b35354d39
|
@ -103,7 +103,6 @@ struct cbfs_file * rom_alloc(struct rom *rom, const char *name, unsigned long si
|
||||||
struct cbfs_file *c = NULL;
|
struct cbfs_file *c = NULL;
|
||||||
unsigned long nextoffset, truncoffset;
|
unsigned long nextoffset, truncoffset;
|
||||||
struct cbfs_file *newfile = NULL;
|
struct cbfs_file *newfile = NULL;
|
||||||
unsigned int csize;
|
|
||||||
|
|
||||||
while (offset < rom->fssize) {
|
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);
|
c->len = htonl(size);
|
||||||
|
|
||||||
csize = headersize(name);
|
|
||||||
|
|
||||||
strcpy(c->magic, COMPONENT_MAGIC);
|
strcpy(c->magic, COMPONENT_MAGIC);
|
||||||
|
|
||||||
c->offset = htonl(csize);
|
c->offset = htonl(headersize(name));
|
||||||
|
|
||||||
c->type = htonl(type);
|
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 )
|
int rom_extract(struct rom *rom, const char *name, void** buf, int *size )
|
||||||
{
|
{
|
||||||
struct cbfs_file *c = rom_find_by_name(rom, name);
|
struct cbfs_file *c = rom_find_by_name(rom, name);
|
||||||
unsigned int csize;
|
|
||||||
|
|
||||||
if (c == NULL) {
|
if (c == NULL) {
|
||||||
ERROR("Component %s does not exist\n", name);
|
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);
|
*size = ntohl(c->len);
|
||||||
|
*buf = ((unsigned char *)c) + headersize(name);
|
||||||
csize = headersize(name);
|
|
||||||
*buf = ((unsigned char *)c) + csize;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue