mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-12 01:14:41 +08:00
bridgeif: Remove redundant port_netif NULL test in bridgeif_send_to_port
portif = br->ports[dstport_idx].port_netif; So no need to have NULL test for both br->ports[dstport_idx].port_netif and portif. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
This commit is contained in:
parent
2ceedfe097
commit
975e23bf5e
@ -252,7 +252,6 @@ bridgeif_send_to_port(bridgeif_private_t *br, struct pbuf *p, u8_t dstport_idx)
|
|||||||
/* possibly an external port */
|
/* possibly an external port */
|
||||||
if (dstport_idx < br->max_ports) {
|
if (dstport_idx < br->max_ports) {
|
||||||
struct netif *portif = br->ports[dstport_idx].port_netif;
|
struct netif *portif = br->ports[dstport_idx].port_netif;
|
||||||
if (br->ports[dstport_idx].port_netif != NULL) {
|
|
||||||
if ((portif != NULL) && (portif->linkoutput != NULL)) {
|
if ((portif != NULL) && (portif->linkoutput != NULL)) {
|
||||||
/* prevent sending out to rx port */
|
/* prevent sending out to rx port */
|
||||||
if (netif_get_index(portif) != p->if_idx) {
|
if (netif_get_index(portif) != p->if_idx) {
|
||||||
@ -263,7 +262,6 @@ bridgeif_send_to_port(bridgeif_private_t *br, struct pbuf *p, u8_t dstport_idx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
LWIP_ASSERT("invalid port index", dstport_idx == BRIDGEIF_MAX_PORTS);
|
LWIP_ASSERT("invalid port index", dstport_idx == BRIDGEIF_MAX_PORTS);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user