util/cbfstool: Do minor fixes

- Fix truncation of stage->loadaddr by replacing be32toh with be64toh
- Remove some redundant htobe32 calls
- Address checkpatch lints

Change-Id: I81b8cfd9eb0b2feffefaa9338bac9ae209e39a3c
Signed-off-by: Alex James <theracermaster@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60933
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Alex James
2022-01-08 01:29:29 -06:00
committed by Felix Held
parent 88e37c7aff
commit b3398ba562
2 changed files with 4 additions and 7 deletions

View File

@@ -54,7 +54,7 @@ static struct typedesc_t filetypes[] unused = {
{0, NULL}
};
#define CBFS_SUBHEADER(_p) ( (void *) ((((uint8_t *) (_p)) + be32toh((_p)->offset))) )
#define CBFS_SUBHEADER(_p) ((void *) ((((uint8_t *) (_p)) + be32toh((_p)->offset))))
static inline size_t cbfs_file_attr_hash_size(enum vb2_hash_algorithm algo)
{