From d0dc9869e5144d88ab3ea5e985439e11c46e5041 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Sun, 7 Mar 2021 15:44:55 +0100 Subject: [PATCH] wutsocket: avoid aliasing issues --- libraries/wutsocket/hostid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/wutsocket/hostid.c b/libraries/wutsocket/hostid.c index 9a1c3bc..1dd16ec 100644 --- a/libraries/wutsocket/hostid.c +++ b/libraries/wutsocket/hostid.c @@ -5,9 +5,9 @@ long gethostid(void) { - long ip = -1; - ACGetAssignedAddress((uint32_t*) &ip); - return ip; + uint32_t ip = UINT32_MAX; + ACGetAssignedAddress(&ip); + return (long)ip; } int