mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-03 21:32:08 +00:00
fixed warning about potentially unused variable 'netif' after changing ip4/6_input_accept to return in, not netif*
This commit is contained in:
parent
ea41480232
commit
5f0fbdcde9
@ -529,6 +529,7 @@ ip4_input(struct pbuf *p, struct netif *inp)
|
|||||||
if (ip4_input_accept(inp)) {
|
if (ip4_input_accept(inp)) {
|
||||||
netif = inp;
|
netif = inp;
|
||||||
} else {
|
} else {
|
||||||
|
netif = NULL;
|
||||||
#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF
|
#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF
|
||||||
/* Packets sent to the loopback address must not be accepted on an
|
/* Packets sent to the loopback address must not be accepted on an
|
||||||
* interface that does not have the loopback address assigned to it,
|
* interface that does not have the loopback address assigned to it,
|
||||||
@ -536,7 +537,7 @@ ip4_input(struct pbuf *p, struct netif *inp)
|
|||||||
if (!ip4_addr_isloopback(ip4_current_dest_addr()))
|
if (!ip4_addr_isloopback(ip4_current_dest_addr()))
|
||||||
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
|
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
|
||||||
{
|
{
|
||||||
#if ! LWIP_SINGLE_NETIF
|
#if !LWIP_SINGLE_NETIF
|
||||||
NETIF_FOREACH(netif) {
|
NETIF_FOREACH(netif) {
|
||||||
if (netif == inp) {
|
if (netif == inp) {
|
||||||
/* we checked that before already */
|
/* we checked that before already */
|
||||||
|
@ -620,6 +620,7 @@ ip6_input(struct pbuf *p, struct netif *inp)
|
|||||||
if (ip6_input_accept(inp)) {
|
if (ip6_input_accept(inp)) {
|
||||||
netif = inp;
|
netif = inp;
|
||||||
} else {
|
} else {
|
||||||
|
netif = NULL;
|
||||||
#if !IPV6_CUSTOM_SCOPES
|
#if !IPV6_CUSTOM_SCOPES
|
||||||
/* Shortcut: stop looking for other interfaces if either the source or
|
/* Shortcut: stop looking for other interfaces if either the source or
|
||||||
* the destination has a scope constrained to this interface. Custom
|
* the destination has a scope constrained to this interface. Custom
|
||||||
@ -641,7 +642,7 @@ ip6_input(struct pbuf *p, struct netif *inp)
|
|||||||
goto netif_found;
|
goto netif_found;
|
||||||
}
|
}
|
||||||
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
|
#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */
|
||||||
#if ! LWIP_SINGLE_NETIF
|
#if !LWIP_SINGLE_NETIF
|
||||||
NETIF_FOREACH(netif) {
|
NETIF_FOREACH(netif) {
|
||||||
if (netif == inp) {
|
if (netif == inp) {
|
||||||
/* we checked that before already */
|
/* we checked that before already */
|
||||||
|
Loading…
Reference in New Issue
Block a user