aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2020-05-08 14:50:18 +0900
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-05-09 09:30:28 +0200
commite2a5b8603087bc3f8f9acd4cc171df48e7ef0a6a (patch)
tree1eecd9174554a305e964acf3b25c78de670d3c73 /cmd
parentd67591dc22f9a6d41163fb6ba0efce5fa0598830 (diff)
downloadu-boot-e2a5b8603087bc3f8f9acd4cc171df48e7ef0a6a.zip
u-boot-e2a5b8603087bc3f8f9acd4cc171df48e7ef0a6a.tar.gz
u-boot-e2a5b8603087bc3f8f9acd4cc171df48e7ef0a6a.tar.bz2
cmd: efidebug: add a comment against Coverity check (300329)
The check here, "Null pointer dereferences," is a false positive. So leave a comment. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reported-by: Coverity (CID 300329)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/efidebug.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 5e3bf16..668e5c4 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -480,6 +480,11 @@ static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag,
EFI_PHYS_ADDR_WIDTH - 5, spc, EFI_PHYS_ADDR_WIDTH - 3, spc);
printf("================ %.*s %.*s ==========\n",
EFI_PHYS_ADDR_WIDTH, sep, EFI_PHYS_ADDR_WIDTH, sep);
+ /*
+ * Coverity check: dereferencing null pointer "map."
+ * This is a false positive as memmap will always be
+ * populated by allocate_pool() above.
+ */
for (i = 0, map = memmap; i < map_size / sizeof(*map); map++, i++) {
if (map->type < ARRAY_SIZE(efi_mem_type_string))
type = efi_mem_type_string[map->type];