Author: myles
Date: 2009-05-13 04:48:58 +0200 (Wed, 13 May 2009)
New Revision: 4279

Modified:
   trunk/coreboot-v2/util/cbfstool/fs.c
Log:
Remove a shadowed variable and an unnecessary local variable in cbfstool/fs.c.

It is nearly trivial.

Signed-off-by: Myles Watson<[email protected]>
Acked-by: Ronald G. Minnich <[email protected]>


Modified: trunk/coreboot-v2/util/cbfstool/fs.c
===================================================================
--- trunk/coreboot-v2/util/cbfstool/fs.c        2009-05-13 02:47:14 UTC (rev 
4278)
+++ trunk/coreboot-v2/util/cbfstool/fs.c        2009-05-13 02:48:58 UTC (rev 
4279)
@@ -103,7 +103,6 @@
        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 @@
 
        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_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 @@
        }
 
        *size = ntohl(c->len);
-
-       csize = headersize(name);
-       *buf = ((unsigned char *)c) + csize;
+       *buf = ((unsigned char *)c) + headersize(name);
        return 0;
 }
 


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to