Skip to contentSkip to conversation

erofs-utils: lib: fix get_unaligned_le64() return type

PATCH New Vansh Choudhary 1 participant 1 message Apr 9

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erofs-utils: lib: fix get_unaligned_le64() return type

get_unaligned_le64() reads a 64-bit little-endian value but is declared to return u32. Return u64 so callers do not lose the upper 32 bits.

---
 include/erofs/defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/erofs/defs.h +1 -1
index 71ca11b..37f349f 100644
@@ -228,7 +228,7 @@ static inline void put_unaligned_le32(u32 val, void *p)
 	__put_unaligned_t(__le32, cpu_to_le32(val), p);
 }
 
-static inline u32 get_unaligned_le64(const void *p)
+static inline u64 get_unaligned_le64(const void *p)
 {
 	return le64_to_cpu(__get_unaligned_t(__le64, p));
 }
Signature · 1 line
2.43.0