mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
fix move_to_unaligned32
This commit is contained in:
parent
66cb86e489
commit
3be2308676
@ -173,7 +173,10 @@
|
|||||||
/* performs reasonably well (gcc usually inlines memcpy here) */
|
/* performs reasonably well (gcc usually inlines memcpy here) */
|
||||||
#define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2))
|
#define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2))
|
||||||
#define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4))
|
#define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4))
|
||||||
#define move_to_unaligned32(u32p, v) (memcpy((u32p), &(v), 4))
|
#define move_to_unaligned32(u32p, v) do { \
|
||||||
|
uint32_t __t = (v); \
|
||||||
|
memcpy((u32p), &__t, 4); \
|
||||||
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---- Networking ------------------------------------------ */
|
/* ---- Networking ------------------------------------------ */
|
||||||
|
Loading…
Reference in New Issue
Block a user