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:
Axel Lin 2017-08-24 10:25:44 +08:00 committed by Dirk Ziegelmeier
parent 1ed1cfe83a
commit 2e4867fcde

View File

@ -2007,11 +2007,6 @@ lwip_netconn_do_join_leave_group_netif(void *m)
struct api_msg *msg = (struct api_msg*)m;
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);
if (netif == NULL) {
msg->err = ERR_IF;