Skip to content
Snippets Groups Projects
Commit f33eedac authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Avoid undefined behaviour.

parent a71eb083
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,10 @@
static inline u32 __get_unaligned_be32(const u8 *p)
{
return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
return (u32)p[0] << 24 |
(u32)p[1] << 16 |
(u32)p[2] << 8 |
(u32)p[3];
}
static inline void __put_unaligned_be32(u32 val, u8 *p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment