From 64639d6661ab3d8f37d5f49dda9dbbb44a7f31c2 Mon Sep 17 00:00:00 2001 From: dartvader316 Date: Wed, 7 Aug 2024 15:52:56 +0300 Subject: [PATCH] fix dereferencing type-punned pointer warning --- proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy.c b/proxy.c index a321609..c938857 100644 --- a/proxy.c +++ b/proxy.c @@ -58,7 +58,8 @@ void map_fix(struct sockaddr_ina *addr, char f6) else if (!ipv6m->o64 && !ipv6m->o16 && ipv6m->t16 == 0xffff && !f6) { addr->sa.sa_family = AF_INET; - addr->in.sin_addr = *(struct in_addr *)(&ipv6m->o32); + const struct in_addr *sin_addr_ptr = (struct in_addr *) &ipv6m->o32; + addr->in.sin_addr = *sin_addr_ptr; } }