[PATCH 1/4] imd: fix imd_is_crc32()

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


Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
 include/image-metadata.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/image-metadata.h b/include/image-metadata.h
index a9cb9cfe8f..439a0cba81 100644
--- a/include/image-metadata.h
+++ b/include/image-metadata.h
@@ -67,7 +67,7 @@ struct imd_entry_crc32 {
 
 static inline int imd_is_crc32(uint32_t type)
 {
-	return (type & IMD_TYPE_CRC32) ? 1 : 0;
+	return type == IMD_TYPE_CRC32;
 }
 
 static inline int imd_crc32_is_valid(uint32_t flags)
-- 
2.33.0




More information about the barebox mailing list