mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-26 16:12:55 +00:00
Minor compile fix in netifapi.c: Use LWIP_CONST_CAST to cast away constness
This commit is contained in:
parent
1b20e664bf
commit
edac92d03a
@ -272,7 +272,7 @@ netifapi_netif_name_to_index(const char *name, u8_t *index)
|
|||||||
strncpy(NETIFAPI_VAR_REF(msg).msg.ifs.name, name, IF_NAMESIZE - 1);
|
strncpy(NETIFAPI_VAR_REF(msg).msg.ifs.name, name, IF_NAMESIZE - 1);
|
||||||
NETIFAPI_VAR_REF(msg).msg.ifs.name[IF_NAMESIZE - 1] = '\0';
|
NETIFAPI_VAR_REF(msg).msg.ifs.name[IF_NAMESIZE - 1] = '\0';
|
||||||
#else
|
#else
|
||||||
NETIFAPI_VAR_REF(msg).msg.ifs.name = (char *)name;
|
NETIFAPI_VAR_REF(msg).msg.ifs.name = LWIP_CONST_CAST(char*, name);
|
||||||
#endif /* LWIP_MPU_COMPATIBLE */
|
#endif /* LWIP_MPU_COMPATIBLE */
|
||||||
err = tcpip_api_call(netifapi_do_name_to_index, &API_VAR_REF(msg).call);
|
err = tcpip_api_call(netifapi_do_name_to_index, &API_VAR_REF(msg).call);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user