refactor(fconf): use macro to set image info
Use the provided macro to set the image_info_t header rather than doing
it manually.
Change-Id: I45fd62c3947c9a23c2cb0df542ce2424955e2f8b
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
diff --git a/lib/fconf/fconf.c b/lib/fconf/fconf.c
index 136e056..99f56d4 100644
--- a/lib/fconf/fconf.c
+++ b/lib/fconf/fconf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2025, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -18,15 +18,11 @@
{
int err;
const struct dyn_cfg_dtb_info_t *config_info;
+ image_info_t config_image_info;
assert((image_id == FW_CONFIG_ID) || (image_id == TB_FW_CONFIG_ID));
- image_info_t config_image_info = {
- .h.type = (uint8_t)PARAM_IMAGE_BINARY,
- .h.version = (uint8_t)VERSION_2,
- .h.size = (uint16_t)sizeof(image_info_t),
- .h.attr = 0
- };
+ SET_PARAM_HEAD(&config_image_info, PARAM_IMAGE_BINARY, VERSION_2, 0);
config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, image_id);
assert(config_info != NULL);