From b6f32caaadec82cb8e2987bf4f97a53721ea8160 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 5 Nov 2016 10:51:06 +0100 Subject: [PATCH] Fix inet_addr_to_ipaddr_p() macro --- src/include/lwip/inet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/lwip/inet.h b/src/include/lwip/inet.h index 036cd988..17edef33 100644 --- a/src/include/lwip/inet.h +++ b/src/include/lwip/inet.h @@ -134,8 +134,8 @@ extern const struct in6_addr in6addr_any; #define inet_addr_from_ipaddr(target_inaddr, source_ipaddr) ((target_inaddr)->s_addr = ip4_addr_get_u32(source_ipaddr)) #define inet_addr_to_ipaddr(target_ipaddr, source_inaddr) (ip4_addr_set_u32(target_ipaddr, (source_inaddr)->s_addr)) -/* ATTENTION: the next define only works because both s_addr and ip_addr_t are an u32_t effectively! */ -#define inet_addr_to_ipaddr_p(target_ipaddr_p, source_inaddr) ((target_ipaddr_p) = (ip_addr_t*)&((source_inaddr)->s_addr)) +/* ATTENTION: the next define only works because both s_addr and ip4_addr_t are an u32_t effectively! */ +#define inet_addr_to_ipaddr_p(target_ip4addr_p, source_inaddr) ((target_ip4addr_p) = (ip4_addr_t*)&((source_inaddr)->s_addr)) /* directly map this to the lwip internal functions */ #define inet_addr(cp) ipaddr_addr(cp)