diff --git a/src/core/netif.c b/src/core/netif.c index d998288f..787e018e 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -1302,14 +1302,14 @@ netif_name_to_index(const char *name) * @param name char buffer of at least IF_NAMESIZE bytes */ char * -netif_index_to_name(u8_t index, char *name) +netif_index_to_name(u8_t idx, char *name) { struct netif *curif = netif_list; u8_t num; - if (index == 0) { + if (idx == 0) { return NULL; /* indexes start at 1 */ } - num = netif_index_to_num(index); + num = netif_index_to_num(idx); /* find netif from num */ while (curif != NULL) { diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 6fd20a36..abd4e440 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -492,7 +492,7 @@ err_t netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t /* @ingroup netif */ u8_t netif_name_to_index(const char *name); -char * netif_index_to_name(u8_t index, char *name); +char * netif_index_to_name(u8_t idx, char *name); /* Interface indexes always start at 1 per RFC 3493, section 4, num starts at 0 */ #define netif_num_to_index(netif) ((netif)->num + 1)