mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 21:14:09 +00:00
minor: dhcp_network_changed(): assert for valid state, fix coding style
This commit is contained in:
parent
855ea02b15
commit
1839153609
@ -845,8 +845,9 @@ dhcp_network_changed(struct netif *netif)
|
||||
{
|
||||
struct dhcp *dhcp = netif_dhcp_data(netif);
|
||||
|
||||
if (!dhcp)
|
||||
if (!dhcp) {
|
||||
return;
|
||||
}
|
||||
switch (dhcp->state) {
|
||||
case DHCP_STATE_REBINDING:
|
||||
case DHCP_STATE_RENEWING:
|
||||
@ -859,6 +860,7 @@ dhcp_network_changed(struct netif *netif)
|
||||
/* stay off */
|
||||
break;
|
||||
default:
|
||||
LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
|
||||
/* INIT/REQUESTING/CHECKING/BACKING_OFF restart with new 'rid' because the
|
||||
state changes, SELECTING: continue with current 'rid' as we stay in the
|
||||
same state */
|
||||
|
Loading…
Reference in New Issue
Block a user