From da2478b76152c780e5fdfcad34af48d4bd199e60 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 5 Jan 2018 09:52:08 +0800 Subject: [PATCH] netif: Enclosing macro argument in parentheses for NETIF_FOREACH Signed-off-by: Axel Lin Signed-off-by: goldsimon --- src/include/lwip/netif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 6b302bfd..77d0fb82 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -379,7 +379,7 @@ struct netif { #else /* LWIP_SINGLE_NETIF */ /** The list of network interfaces. */ extern struct netif *netif_list; -#define NETIF_FOREACH(netif) for (netif = netif_list; netif != NULL; netif = netif->next) +#define NETIF_FOREACH(netif) for ((netif) = netif_list; (netif) != NULL; (netif) = (netif)->next) #endif /* LWIP_SINGLE_NETIF */ /** The default network interface. */ extern struct netif *netif_default;