mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-13 06:37:25 +00:00
api_msg: Remove superfluous NETIF_NO_INDEX checking
netif_get_by_index() returns NULL if idx is NETIF_NO_INDEX. So remove the superfluous NETIF_NO_INDEX checking for msg->msg.jl.if_idx before calling netif_get_by_index(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
This commit is contained in:
parent
1ed1cfe83a
commit
2e4867fcde
@ -2007,11 +2007,6 @@ lwip_netconn_do_join_leave_group_netif(void *m)
|
|||||||
struct api_msg *msg = (struct api_msg*)m;
|
struct api_msg *msg = (struct api_msg*)m;
|
||||||
struct netif *netif;
|
struct netif *netif;
|
||||||
|
|
||||||
if (msg->msg.jl.if_idx == NETIF_NO_INDEX) {
|
|
||||||
msg->err = ERR_IF;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
netif = netif_get_by_index(msg->msg.jl.if_idx);
|
netif = netif_get_by_index(msg->msg.jl.if_idx);
|
||||||
if (netif == NULL) {
|
if (netif == NULL) {
|
||||||
msg->err = ERR_IF;
|
msg->err = ERR_IF;
|
||||||
|
Loading…
Reference in New Issue
Block a user