From 819224f0e53445d073985ded9fc2e8c2f6032928 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 23 Mar 2017 09:29:31 +0100 Subject: [PATCH] Fix bug #50618: dhcp_remove_struct() macro does not work Patch by Benjamin Silvestre --- src/include/lwip/dhcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/dhcp.h b/src/include/lwip/dhcp.h index f240a95d..6863b7e9 100644 --- a/src/include/lwip/dhcp.h +++ b/src/include/lwip/dhcp.h @@ -108,7 +108,7 @@ struct dhcp void dhcp_set_struct(struct netif *netif, struct dhcp *dhcp); /** Remove a struct dhcp previously set to the netif using dhcp_set_struct() */ -#define dhcp_remove_struct(netif) do { (netif)->dhcp = NULL; } while(0) +#define dhcp_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL) void dhcp_cleanup(struct netif *netif); err_t dhcp_start(struct netif *netif); err_t dhcp_renew(struct netif *netif);