diff --git a/src/core/tcp.c b/src/core/tcp.c index 472737ff..4054f9ad 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -2199,7 +2199,7 @@ tcp_netif_ip_addr_changed_pcblist(const ip_addr_t *old_addr, struct tcp_pcb *pcb void tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { - struct tcp_pcb_listen *lpcb, *next; + struct tcp_pcb_listen *lpcb; if (!ip_addr_isany(old_addr)) { tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); @@ -2207,8 +2207,7 @@ tcp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) if (!ip_addr_isany(new_addr)) { /* PCB bound to current local interface address? */ - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) { - next = lpcb->next; + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { /* PCB bound to current local interface address? */ if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { /* The PCB is listening to the old ipaddr and