[PATCH 2/4] imd: reuse imd_is_crc32()

Antony Pavlov antonynpavlov at gmail.com
Wed Oct 27 18:28:14 PDT 2021


Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
 common/imd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/imd.c b/common/imd.c
index e1d5733c6b..0295d84d34 100644
--- a/common/imd.c
+++ b/common/imd.c
@@ -317,7 +317,7 @@ static int imd_calculate_crc32(void *input, const struct imd_header *imd_start,
 		length = ALIGN(length, 4);
 		length += sizeof(struct imd_header);
 
-		if (imd_read_type(imd) == IMD_TYPE_CRC32) {
+		if (imd_is_crc32(imd_read_type(imd))) {
 			*imd_crc = (struct imd_header *)imd;
 			debug("Found crc token at %d\n", end_ofs);
 			break;
-- 
2.33.0




More information about the barebox mailing list