From ebf7959880736796aa32927aa47117f74f329286 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 18 Aug 2016 11:44:19 +0200 Subject: [PATCH] Coding style fixes in netif.c --- src/core/netif.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/core/netif.c b/src/core/netif.c index 17d7fd74..cb759f5f 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -91,6 +91,10 @@ struct netif *netif_default; static u8_t netif_num; +#if LWIP_NUM_NETIF_CLIENT_DATA > 0 +static u8_t netif_client_id = 0; +#endif + #define NETIF_REPORT_TYPE_IPV4 0x01 #define NETIF_REPORT_TYPE_IPV6 0x02 static void netif_issue_reports(struct netif* netif, u8_t report_type); @@ -933,20 +937,19 @@ netif_poll_all(void) #endif /* ENABLE_LOOPBACK */ #if LWIP_NUM_NETIF_CLIENT_DATA > 0 -static u8_t netif_client_id = 0; - /** * @ingroup netif * Allocate an index to store data in client_data member of struct netif. * Returned value is an index in mentioned array. * @see LWIP_NUM_NETIF_CLIENT_DATA */ -u8_t netif_alloc_client_data_id(void) +u8_t +netif_alloc_client_data_id(void) { - u8_t result = netif_client_id; - netif_client_id++; - LWIP_ASSERT("Increase LWIP_NUM_NETIF_CLIENT_DATA in lwipopts.h", netif_client_id<=LWIP_NUM_NETIF_CLIENT_DATA); - return result; + u8_t result = netif_client_id; + netif_client_id++; + LWIP_ASSERT("Increase LWIP_NUM_NETIF_CLIENT_DATA in lwipopts.h", netif_client_id<=LWIP_NUM_NETIF_CLIENT_DATA); + return result; } #endif