Skip to content
Snippets Groups Projects
Commit f8204d79 authored by Joakim Nohlgård's avatar Joakim Nohlgård
Browse files

sys/net: do not use memcpy for single uint32_t copy

Saves two unnecessary function calls.
parent 21dc560a
No related branches found
No related tags found
No related merge requests found
...@@ -159,8 +159,9 @@ void auto_init_net_if(void) ...@@ -159,8 +159,9 @@ void auto_init_net_if(void)
CPUID_ID_LEN / 2 + 1); CPUID_ID_LEN / 2 + 1);
#endif /* CPUID_ID_LEN % 2 == 0 */ #endif /* CPUID_ID_LEN % 2 == 0 */
memcpy(&(eui64.uint32[0]), &hash_h, sizeof(uint32_t)); eui64.uint32[1] = hash_l;
memcpy(&(eui64.uint32[1]), &hash_l, sizeof(uint32_t)); eui64.uint32[0] = hash_h;
/* Set Local/Universal bit to Local since this EUI64 is made up. */ /* Set Local/Universal bit to Local since this EUI64 is made up. */
eui64.uint8[0] |= 0x02; eui64.uint8[0] |= 0x02;
net_if_set_eui64(iface, &eui64); net_if_set_eui64(iface, &eui64);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment