Skip to content
Snippets Groups Projects
Commit 46a3e8ac authored by Oleg Hahm's avatar Oleg Hahm
Browse files

Merge pull request #2977 from gebart/pr/auto-init-eui64-no-memcpy

sys/net: do not use memcpy for single uint32_t copy
parents 05f47b2a f8204d79
No related branches found
No related tags found
No related merge requests found
......@@ -159,8 +159,9 @@ void auto_init_net_if(void)
CPUID_ID_LEN / 2 + 1);
#endif /* CPUID_ID_LEN % 2 == 0 */
memcpy(&(eui64.uint32[0]), &hash_h, sizeof(uint32_t));
memcpy(&(eui64.uint32[1]), &hash_l, sizeof(uint32_t));
eui64.uint32[1] = hash_l;
eui64.uint32[0] = hash_h;
/* Set Local/Universal bit to Local since this EUI64 is made up. */
eui64.uint8[0] |= 0x02;
net_if_set_eui64(iface, &eui64);
......
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