tcp: Remove superfluous variable in tcp_netif_ip_addr_changed()

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
Axel Lin 2017-11-17 09:33:06 +01:00 committed by goldsimon
parent 2ff0ef027e
commit d99144eef1

View File

@ -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