mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-28 23:23:30 +08:00
tools: imx8image: fix coverity CID 184233
Fix: CID 184233: (NEGATIVE_RETURNS) Using variable "container" as an index to array "imx_header.fhdr". Reported-by: Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
df439e938c
commit
a9f7f1c585
@ -812,6 +812,10 @@ static int build_container(soc_type_t soc, uint32_t sector_size,
|
|||||||
case SCFW:
|
case SCFW:
|
||||||
case DATA:
|
case DATA:
|
||||||
case MSG_BLOCK:
|
case MSG_BLOCK:
|
||||||
|
if (container < 0) {
|
||||||
|
fprintf(stderr, "No container found\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
check_file(&sbuf, img_sp->filename);
|
check_file(&sbuf, img_sp->filename);
|
||||||
tmp_filename = img_sp->filename;
|
tmp_filename = img_sp->filename;
|
||||||
set_image_array_entry(&imx_header.fhdr[container],
|
set_image_array_entry(&imx_header.fhdr[container],
|
||||||
@ -825,6 +829,10 @@ static int build_container(soc_type_t soc, uint32_t sector_size,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SECO:
|
case SECO:
|
||||||
|
if (container < 0) {
|
||||||
|
fprintf(stderr, "No container found\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
check_file(&sbuf, img_sp->filename);
|
check_file(&sbuf, img_sp->filename);
|
||||||
tmp_filename = img_sp->filename;
|
tmp_filename = img_sp->filename;
|
||||||
set_image_array_entry(&imx_header.fhdr[container],
|
set_image_array_entry(&imx_header.fhdr[container],
|
||||||
|
Loading…
Reference in New Issue
Block a user