mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 00:15:16 +00:00
Changed netif name formatting from %s to %c%c.
This commit is contained in:
parent
a1efd95d0f
commit
4ecb01f4fd
@ -119,7 +119,6 @@ netif_set_addr(struct netif *netif,struct ip_addr *ipaddr, struct ip_addr *netma
|
||||
netif_set_gw(netif, gw);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void netif_remove(struct netif * netif)
|
||||
{
|
||||
if ( netif == NULL ) return;
|
||||
@ -128,8 +127,7 @@ void netif_remove(struct netif * netif)
|
||||
if (netif_list == netif) {
|
||||
netif_list = netif->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
/* look for netif further down the list */
|
||||
struct netif * tmpNetif;
|
||||
for (tmpNetif = netif_list; tmpNetif != NULL; tmpNetif = tmpNetif->next) {
|
||||
@ -145,12 +143,10 @@ void netif_remove(struct netif * netif)
|
||||
if (netif_default == netif)
|
||||
/* reset default netif */
|
||||
netif_default = NULL;
|
||||
|
||||
DEBUGF( NETIF_DEBUG, ("netif_remove: removed netif\n") );
|
||||
mem_free( netif );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
struct netif *
|
||||
netif_find(char *name)
|
||||
{
|
||||
@ -167,11 +163,11 @@ netif_find(char *name)
|
||||
if(num == netif->num &&
|
||||
name[0] == netif->name[0] &&
|
||||
name[1] == netif->name[1]) {
|
||||
DEBUGF(NETIF_DEBUG, ("netif_find: found %s\n", name));
|
||||
DEBUGF(NETIF_DEBUG, ("netif_find: found %c%c\n", name[0], name[1]));
|
||||
return netif;
|
||||
}
|
||||
}
|
||||
DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %s\n", name));
|
||||
DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %c%c\n", name[0], name[1]));
|
||||
return NULL;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
Loading…
Reference in New Issue
Block a user