Commit 39a8d5c4 authored by Marek Vasut's avatar Marek Vasut

mxssb: Squash the ternary operator in section flags

When printing the section flags, the BOOTABLE flag is assigned via
a ternary operator, clean this up.
Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
parent fe14535e
......@@ -1616,7 +1616,7 @@ static int sb_verify_sections_cmds(struct sb_image_ctx *ictx, FILE *fp)
int ret;
struct sb_section_ctx *sctx;
unsigned long size;
char *bootable;
char *bootable = "";
fprintf(stdout, "----- Verifying SB Sections and Commands -----\n");
......@@ -1655,13 +1655,14 @@ static int sb_verify_sections_cmds(struct sb_image_ctx *ictx, FILE *fp)
while (sctx) {
shdr = &sctx->payload;
if (shdr->section_flags & SB_SECTION_FLAG_BOOTABLE)
if (shdr->section_flags & SB_SECTION_FLAG_BOOTABLE) {
sctx->boot = 1;
bootable = sctx->boot ? "BOOTABLE" : "";
bootable = " BOOTABLE";
}
sctx->size = (shdr->section_size * SB_BLOCK_SIZE) +
sizeof(struct sb_command);
fprintf(stdout, "SECTION 0x%x %s # size = %i bytes\n",
fprintf(stdout, "SECTION 0x%x%s # size = %i bytes\n",
shdr->section_number, bootable, sctx->size);
if (shdr->section_flags & ~SB_SECTION_FLAG_BOOTABLE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment