PPP, PPPoL2TP, warning fix if PPP IPv6 is enabled

lwip/src/netif/ppp/pppol2tp.c: In function ‘pppol2tp_udp_send’:
lwip/src/netif/ppp/pppol2tp.c:1229:3: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   return err;
   ^
This commit is contained in:
Sylvain Rochet 2015-03-14 12:48:38 +01:00
parent 8974b12af5
commit f666e772a2

View File

@ -1214,9 +1214,9 @@ static err_t pppol2tp_udp_send(pppol2tp_pcb *l2tp, struct pbuf *pb) {
#if LWIP_IPV6
if (PCB_ISIPV6(l2tp->udp)) {
if (l2tp->netif) {
udp_sendto_if_ip6(l2tp->udp, pb, &l2tp->remote_ip.ip6, l2tp->tunnel_port, l2tp->netif);
err = udp_sendto_if_ip6(l2tp->udp, pb, &l2tp->remote_ip.ip6, l2tp->tunnel_port, l2tp->netif);
} else {
udp_sendto_ip6(l2tp->udp, pb, &l2tp->remote_ip.ip6, l2tp->tunnel_port);
err = udp_sendto_ip6(l2tp->udp, pb, &l2tp->remote_ip.ip6, l2tp->tunnel_port);
}
} else
#endif /* LWIP_IPV6 */