Browse Source

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>
STABLE-2_1_x
Sylvain Rochet 8 years ago
parent
commit
a48ff4aaf2
  1. 2
      src/netif/ppp/pppoe.c

2
src/netif/ppp/pppoe.c

@ -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);
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);
pbuf_free(pb);
return ERR_BUF;

Loading…
Cancel
Save