patch 1197 form floriZ.When debug is on and port is 0 in udp_bind ERR_USE is always returned due to missing braces.Reindent that part of code while at it

This commit is contained in:
jani 2003-03-19 16:04:54 +00:00
parent 84697ce713
commit 2f7e4bd587

View File

@ -483,10 +483,12 @@ udp_bind(struct udp_pcb *pcb, struct ip_addr *ipaddr, u16_t port)
} else } else
ipcb = ipcb->next; ipcb = ipcb->next;
} }
if(ipcb) /* no more ports available in local range */ if(ipcb) {
/* no more ports available in local range */
DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n"));
return ERR_USE; return ERR_USE;
} }
}
pcb->local_port = port; pcb->local_port = port;
/* We need to place the PCB on the list if not already there. */ /* We need to place the PCB on the list if not already there. */
if (rebind == 0) { if (rebind == 0) {