mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-28 08:35:38 +00:00
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)
This commit is contained in:
parent
d67591dc22
commit
e2a5b86030
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
EFI_PHYS_ADDR_WIDTH - 5, spc, EFI_PHYS_ADDR_WIDTH - 3, spc);
|
||||||
printf("================ %.*s %.*s ==========\n",
|
printf("================ %.*s %.*s ==========\n",
|
||||||
EFI_PHYS_ADDR_WIDTH, sep, EFI_PHYS_ADDR_WIDTH, sep);
|
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++) {
|
for (i = 0, map = memmap; i < map_size / sizeof(*map); map++, i++) {
|
||||||
if (map->type < ARRAY_SIZE(efi_mem_type_string))
|
if (map->type < ARRAY_SIZE(efi_mem_type_string))
|
||||||
type = efi_mem_type_string[map->type];
|
type = efi_mem_type_string[map->type];
|
||||||
|
|
Loading…
Add table
Reference in a new issue