summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-01-15 23:20:00 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-01-27 13:21:21 +0900
commit67973fb4f73411e08f0de39fed0ca21f97de73eb (patch)
tree84b637d3ab31242bb06b7bb0ff57bac2b26ab3a3 /tools
parent40866aaf1c60b31d46b1b969598e3403a4d8a6c1 (diff)
fiptool: remove always true conditional
The conditional if (desc != NULL) ... is always true here because we assert it 6 lines above: assert(desc != NULL); Remove the if-conditional and concatenate the printf() calls. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/fiptool/fiptool.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/fiptool/fiptool.c b/tools/fiptool/fiptool.c
index d51d6ab9..46b87267 100644
--- a/tools/fiptool/fiptool.c
+++ b/tools/fiptool/fiptool.c
@@ -554,12 +554,10 @@ static int info_cmd(int argc, char *argv[])
assert(desc != NULL);
printf("%s: ", desc->name);
image_size = image->size;
- printf("offset=0x%llX, size=0x%llX",
- (unsigned long long)image_offset,
- (unsigned long long)image_size);
- if (desc != NULL)
- printf(", cmdline=\"--%s\"",
- desc->cmdline_name);
+ printf("offset=0x%llX, size=0x%llX, cmdline=\"--%s\"",
+ (unsigned long long)image_offset,
+ (unsigned long long)image_size,
+ desc->cmdline_name);
if (verbose) {
unsigned char md[SHA256_DIGEST_LENGTH];