Cosmetic cbfstool update (trivial)
* remove some dead code * fix indentation * comment in some destructors and fix some other warnings * use HOSTCC instead of CC (not all the way cosmetic, but very simple) Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4299 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
committed by
Stefan Reinauer
parent
bbe29ee06e
commit
3a5c27763f
@@ -95,7 +95,6 @@ int resize_handler(struct rom *rom, int argc, char **argv)
|
||||
/* The first entry doesn't have to move */
|
||||
|
||||
c = rom_find(rom, rom->header->offset);
|
||||
offset = rom->header->offset;
|
||||
|
||||
while (c) {
|
||||
struct cbfs_file *n = rom_find_next(rom, c);
|
||||
@@ -105,10 +104,8 @@ int resize_handler(struct rom *rom, int argc, char **argv)
|
||||
break;
|
||||
|
||||
/* Calculate a new location for the entry */
|
||||
next =
|
||||
ROM_OFFSET(rom,
|
||||
c) + ALIGN(ntohl(c->offset) +
|
||||
ntohl(c->len), align);
|
||||
next = ROM_OFFSET(rom, c) +
|
||||
ALIGN(ntohl(c->offset) + ntohl(c->len), align);
|
||||
|
||||
/* Copy the next entry there */
|
||||
memmove(ROM_PTR(rom, next), n,
|
||||
@@ -116,8 +113,10 @@ int resize_handler(struct rom *rom, int argc, char **argv)
|
||||
|
||||
c = (struct cbfs_file *)ROM_PTR(rom, next);
|
||||
|
||||
/* If the previous header wasn't overwritten by the change,
|
||||
corrupt the header so we don't accidently find it */
|
||||
/* If the previous header wasn't overwritten by
|
||||
* the change, corrupt the header so we don't
|
||||
* accidently find it
|
||||
*/
|
||||
|
||||
if (ROM_OFFSET(rom, n) >
|
||||
next + ntohl(c->len) + ntohl(c->offset))
|
||||
|
Reference in New Issue
Block a user