summaryrefslogtreecommitdiff
path: root/common/image-fit-sig.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-09-25 19:43:39 -0600
committerTom Rini <trini@konsulko.com>2021-10-08 15:53:27 -0400
commitb53541f7f61d506c6b19b30357f471472831e9cb (patch)
tree033136478d5985554beea24122477aae7826d88d /common/image-fit-sig.c
parentf33a2c1bd0fb371511a485cac1f182ba50db51be (diff)
image: Remove some #ifdefs from image-fit and image-fit-sig
Drop the #ifdefs which are easy to remove without refactoring. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/image-fit-sig.c')
-rw-r--r--common/image-fit-sig.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c
index e95e64bd2fe..4edebbf2d32 100644
--- a/common/image-fit-sig.c
+++ b/common/image-fit-sig.c
@@ -49,10 +49,8 @@ struct image_region *fit_region_make_list(const void *fit,
* Use malloc() except in SPL (to save code size). In SPL the caller
* must allocate the array.
*/
-#ifndef CONFIG_SPL_BUILD
- if (!region)
+ if (!IS_ENABLED(CONFIG_SPL_BUILD) && !region)
region = calloc(sizeof(*region), count);
-#endif
if (!region)
return NULL;
for (i = 0; i < count; i++) {
@@ -72,12 +70,10 @@ static int fit_image_setup_verify(struct image_sign_info *info,
char *algo_name;
const char *padding_name;
-#ifndef USE_HOSTCC
- if (fdt_totalsize(fit) > CONFIG_FIT_SIGNATURE_MAX_SIZE) {
+ if (fdt_totalsize(fit) > CONFIG_VAL(FIT_SIGNATURE_MAX_SIZE)) {
*err_msgp = "Total size too large";
return 1;
}
-#endif
if (fit_image_hash_get_algo(fit, noffset, &algo_name)) {
*err_msgp = "Can't get hash algo property";
return -1;