mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP, PPPoE: fix trivial build error
lwip/src/netif/ppp/pppoe.c: In function ‘pppoe_send_padt’:
lwip/src/netif/ppp/pppoe.c:1048:108: error: ‘sc’ undeclared (first use in this function)
sc is not passed to ‘pppoe_send_padt’ function because it might be
called to terminate unknown sessions.
Fixes: d4047ea1d1
("Try to fix issues reported by coverity")
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
This commit is contained in:
parent
a51c92b617
commit
a48ff4aaf2
@ -1045,7 +1045,7 @@ pppoe_send_padt(struct netif *outgoing_if, u_int session, const u8_t *dest)
|
|||||||
LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len);
|
LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len);
|
||||||
|
|
||||||
if (pbuf_add_header(pb, sizeof(struct eth_hdr))) {
|
if (pbuf_add_header(pb, sizeof(struct eth_hdr))) {
|
||||||
PPPDEBUG(LOG_ERR, ("pppoe: %c%c%"U16_F": pppoe_send_padt: could not allocate room for PPPoE header\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num));
|
PPPDEBUG(LOG_ERR, ("pppoe: pppoe_send_padt: could not allocate room for PPPoE header\n"));
|
||||||
LINK_STATS_INC(link.lenerr);
|
LINK_STATS_INC(link.lenerr);
|
||||||
pbuf_free(pb);
|
pbuf_free(pb);
|
||||||
return ERR_BUF;
|
return ERR_BUF;
|
||||||
|
Loading…
Reference in New Issue
Block a user