Minor style updates

This commit is contained in:
Adam Dunkels 2014-12-10 09:28:34 +01:00
parent e4c387615e
commit 952e1e4da3
2 changed files with 8 additions and 11 deletions

View file

@ -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;

View file

@ -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_ */