mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
Fix warning about shadowing a global variable "index" in if.c
This commit is contained in:
parent
b5011e7012
commit
9e0b36747a
@ -43,7 +43,7 @@
|
|||||||
#include "lwip/netifapi.h"
|
#include "lwip/netifapi.h"
|
||||||
|
|
||||||
char *
|
char *
|
||||||
lwip_if_indextoname(unsigned ifindex, char *ifname)
|
lwip_if_indextoname(unsigned int ifindex, char *ifname)
|
||||||
{
|
{
|
||||||
#if LWIP_NETIF_API
|
#if LWIP_NETIF_API
|
||||||
err_t err;
|
err_t err;
|
||||||
@ -67,11 +67,11 @@ lwip_if_nametoindex(const char *ifname)
|
|||||||
{
|
{
|
||||||
#if LWIP_NETIF_API
|
#if LWIP_NETIF_API
|
||||||
err_t err;
|
err_t err;
|
||||||
u8_t index;
|
u8_t idx;
|
||||||
|
|
||||||
err = netifapi_netif_name_to_index(ifname, &index);
|
err = netifapi_netif_name_to_index(ifname, &idx);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
return index;
|
return idx;
|
||||||
}
|
}
|
||||||
#else /* LWIP_NETIF_API */
|
#else /* LWIP_NETIF_API */
|
||||||
LWIP_UNUSED_ARG(ifname);
|
LWIP_UNUSED_ARG(ifname);
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#define IF_NAMESIZE 6 /* 2 chars, 3 nums, 1 \0 */
|
#define IF_NAMESIZE 6 /* 2 chars, 3 nums, 1 \0 */
|
||||||
|
|
||||||
char * lwip_if_indextoname(unsigned ifindex, char *ifname);
|
char * lwip_if_indextoname(unsigned int ifindex, char *ifname);
|
||||||
unsigned int lwip_if_nametoindex(const char *ifname);
|
unsigned int lwip_if_nametoindex(const char *ifname);
|
||||||
|
|
||||||
#if LWIP_COMPAT_SOCKETS
|
#if LWIP_COMPAT_SOCKETS
|
||||||
|
Loading…
Reference in New Issue
Block a user