Skip to content

Commit 440ebb9

Browse files
committed
Addressed reviewer's comments
1 parent 00ec1b4 commit 440ebb9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test-app/app_sim.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,18 @@ int do_cmd(const char *cmd)
8585
printf("Get TLV %04x\r\n", tlv);
8686

8787
size = wolfBoot_find_header(imageHdr + IMAGE_HEADER_OFFSET, tlv, &ptr);
88-
if (size >= 0 && ptr != NULL) {
88+
if (size > 0 && ptr != NULL) {
8989
/* From here, the value 0xAABBCCDD is at ptr */
90-
printf("TLV 0x%x:\n", tlv);
90+
printf("TLV 0x%x: found. Size: %d\n", tlv, size);
9191
for (i=0; i<size; i++) {
9292
printf("%02X", ptr[i]);
9393
}
9494
printf("\n");
95+
return 0;
96+
} else {
97+
printf("TLV: not found!\r\n");
98+
return -1;
9599
}
96-
return 0;
97100
}
98101
/* wrong command */
99102
return -1;

0 commit comments

Comments
 (0)