From 952e1e4da3463b7426dbc9da10b39580494a1385 Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Wed, 10 Dec 2014 09:28:34 +0100 Subject: [PATCH] Minor style updates --- core/net/ip/resolv.c | 7 ++++--- core/net/ip/uip-nameserver.h | 12 ++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/core/net/ip/resolv.c b/core/net/ip/resolv.c index 15096a6e3..4a9999cca 100644 --- a/core/net/ip/resolv.c +++ b/core/net/ip/resolv.c @@ -634,9 +634,10 @@ try_next_server(struct namemap *namemapptr) #if VERBOSE_DEBUG printf("server %d\n", namemapptr->server); #endif - if(uip_nameserver_get(++namemapptr->server) != NULL) { - namemapptr->retries = 0; - return 1; + namemapptr->server++; + if(uip_nameserver_get(namemapptr->server) != NULL) { + namemapptr->retries = 0; + return 1; } namemapptr->server = 0; return 0; diff --git a/core/net/ip/uip-nameserver.h b/core/net/ip/uip-nameserver.h index b6f5f102e..41dcf58c8 100644 --- a/core/net/ip/uip-nameserver.h +++ b/core/net/ip/uip-nameserver.h @@ -74,8 +74,7 @@ * considered to remove an entry. Maximum is 0xFFFFFFFF which * is considered infinite. */ -void -uip_nameserver_update(uip_ipaddr_t *nameserver, uint32_t lifetime); +void uip_nameserver_update(uip_ipaddr_t *nameserver, uint32_t lifetime); /** * \brief Get a Nameserver ip address given in RA @@ -83,22 +82,19 @@ uip_nameserver_update(uip_ipaddr_t *nameserver, uint32_t lifetime); * \param num The number of the nameserver to obtain, starting at 0 and going * up to the pool size. */ -uip_ipaddr_t * -uip_nameserver_get(uint8_t num); +uip_ipaddr_t *uip_nameserver_get(uint8_t num); /** * \brief Get next expiration time * * The least expiration time is returned */ -uint32_t -uip_nameserver_next_expiration(void); +uint32_t uip_nameserver_next_expiration(void); /** * \brief Get the number of recorded name servers */ -uint16_t -uip_nameserver_count(void); +uint16_t uip_nameserver_count(void); /** @} */ #endif /* UIP_NAMESERVER_H_ */