File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
tools/include/asm-generic Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,9 @@ static inline u32 get_unaligned_le24(const void *p)
105105
106106static inline void __put_unaligned_be24 (const u32 val , u8 * p )
107107{
108- * p ++ = val >> 16 ;
109- * p ++ = val >> 8 ;
110- * p ++ = val ;
108+ * p ++ = ( val >> 16 ) & 0xff ;
109+ * p ++ = ( val >> 8 ) & 0xff ;
110+ * p ++ = val & 0xff ;
111111}
112112
113113static inline void put_unaligned_be24 (const u32 val , void * p )
@@ -117,9 +117,9 @@ static inline void put_unaligned_be24(const u32 val, void *p)
117117
118118static inline void __put_unaligned_le24 (const u32 val , u8 * p )
119119{
120- * p ++ = val ;
121- * p ++ = val >> 8 ;
122- * p ++ = val >> 16 ;
120+ * p ++ = val & 0xff ;
121+ * p ++ = ( val >> 8 ) & 0xff ;
122+ * p ++ = ( val >> 16 ) & 0xff ;
123123}
124124
125125static inline void put_unaligned_le24 (const u32 val , void * p )
@@ -129,12 +129,12 @@ static inline void put_unaligned_le24(const u32 val, void *p)
129129
130130static inline void __put_unaligned_be48 (const u64 val , u8 * p )
131131{
132- * p ++ = val >> 40 ;
133- * p ++ = val >> 32 ;
134- * p ++ = val >> 24 ;
135- * p ++ = val >> 16 ;
136- * p ++ = val >> 8 ;
137- * p ++ = val ;
132+ * p ++ = ( val >> 40 ) & 0xff ;
133+ * p ++ = ( val >> 32 ) & 0xff ;
134+ * p ++ = ( val >> 24 ) & 0xff ;
135+ * p ++ = ( val >> 16 ) & 0xff ;
136+ * p ++ = ( val >> 8 ) & 0xff ;
137+ * p ++ = val & 0xff ;
138138}
139139
140140static inline void put_unaligned_be48 (const u64 val , void * p )
You can’t perform that action at this time.
0 commit comments