Made first uip_nameserver_update() parameter const.

Both apps/dhcp/dhcp.c:dhcpc_configured() and cpu/6502/ipconfig/ipconfig.c:dhcpc_configured() presume the first parameter of uip_nameserver_update() to be const. As there's no reason for it to be not const just make it const.
This commit is contained in:
Oliver Schmidt 2015-06-14 16:27:39 +02:00
parent adc744ef30
commit a0d9f028d6
2 changed files with 4 additions and 2 deletions

View file

@ -56,8 +56,10 @@ typedef struct uip_nameserver_record {
uint32_t lifetime; uint32_t lifetime;
} uip_nameserver_record; } uip_nameserver_record;
#if UIP_NAMESERVER_POOL_SIZE > 1
/** \brief Initialization flag */ /** \brief Initialization flag */
static uint8_t initialized = 0; static uint8_t initialized = 0;
#endif /* UIP_NAMESERVER_POOL_SIZE > 1 */
/** \name List and memory block /** \name List and memory block
* @{ * @{
@ -90,7 +92,7 @@ init(void)
#endif /* UIP_NAMESERVER_POOL_SIZE > 1 */ #endif /* UIP_NAMESERVER_POOL_SIZE > 1 */
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
void void
uip_nameserver_update(uip_ipaddr_t *nameserver, uint32_t lifetime) uip_nameserver_update(const uip_ipaddr_t *nameserver, uint32_t lifetime)
{ {
#if UIP_NAMESERVER_POOL_SIZE > 1 #if UIP_NAMESERVER_POOL_SIZE > 1
register uip_nameserver_record *e; register uip_nameserver_record *e;

View file

@ -74,7 +74,7 @@
* considered to remove an entry. Maximum is 0xFFFFFFFF which * considered to remove an entry. Maximum is 0xFFFFFFFF which
* is considered infinite. * is considered infinite.
*/ */
void uip_nameserver_update(uip_ipaddr_t *nameserver, uint32_t lifetime); void uip_nameserver_update(const uip_ipaddr_t *nameserver, uint32_t lifetime);
/** /**
* \brief Get a Nameserver ip address given in RA * \brief Get a Nameserver ip address given in RA