summaryrefslogtreecommitdiff
path: root/util/cbfstool/resize.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-05-26 12:22:10 +0000
committerStefan Reinauer <stepan@openbios.org>2009-05-26 12:22:10 +0000
commit3a5c27763f4483f42851c127547e6db0fc5b69bc (patch)
treec4958758a373572f071b81d8dd19fe0b37d9a05f /util/cbfstool/resize.c
parentbbe29ee06e7030bbba6e2c8c5790e785bf7f0c5b (diff)
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
Diffstat (limited to 'util/cbfstool/resize.c')
-rw-r--r--util/cbfstool/resize.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/util/cbfstool/resize.c b/util/cbfstool/resize.c
index d70c6d04ef..ef3267f392 100644
--- a/util/cbfstool/resize.c
+++ b/util/cbfstool/resize.c
@@ -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))