1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

gnrc_lwmac: use uintptr_t to get value of pointer

A pointer is not 32 bit on all platforms.
Since gnrc_lwmac only stores 16 bit in the pointer variable it is
still save to cast like this even on AVR, but cast to uintptr_t
instead of uint32_t.

fixes #12869
This commit is contained in:
Benjamin Valentin 2019-12-10 14:46:19 +01:00 committed by benpicco
parent f38f974d86
commit 00ff291f2e

View File

@ -676,7 +676,7 @@ static void rtt_cb(void *arg)
{
msg_t msg;
msg.content.value = ((uint32_t) arg) & 0xffff;
msg.content.value = (uint16_t)((uintptr_t) arg);
msg.type = GNRC_LWMAC_EVENT_RTT_TYPE;
msg_send(&msg, lwmac_pid);