diff --git a/components/lwip/apps/dhcpserver/dhcpserver.c b/components/lwip/apps/dhcpserver/dhcpserver.c index 3360b46b..2d83623f 100644 --- a/components/lwip/apps/dhcpserver/dhcpserver.c +++ b/components/lwip/apps/dhcpserver/dhcpserver.c @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include @@ -925,26 +926,26 @@ static void wifi_softap_init_dhcps_lease(u32_t ip) u32_t start_ip = 0; u32_t end_ip = 0; - if (dhcps_lease.enable == TRUE) { + if (dhcps_lease.enable == true) { softap_ip = htonl(ip); start_ip = htonl(dhcps_lease.start_ip.addr); end_ip = htonl(dhcps_lease.end_ip.addr); /*config ip information can't contain local ip*/ if ((start_ip <= softap_ip) && (softap_ip <= end_ip)) { - dhcps_lease.enable = FALSE; + dhcps_lease.enable = false; } else { /*config ip information must be in the same segment as the local ip*/ softap_ip >>= 8; if (((start_ip >> 8 != softap_ip) || (end_ip >> 8 != softap_ip)) || (end_ip - start_ip > DHCPS_MAX_LEASE)) { - dhcps_lease.enable = FALSE; + dhcps_lease.enable = false; } } } - if (dhcps_lease.enable == FALSE) { + if (dhcps_lease.enable == false) { local_ip = softap_ip = htonl(ip); softap_ip &= 0xFFFFFF00; local_ip &= 0xFF; @@ -1086,7 +1087,7 @@ bool wifi_softap_get_dhcps_lease(struct dhcps_lease* please) return false; } - if (dhcps_lease.enable == FALSE) { + if (dhcps_lease.enable == false) { if (wifi_softap_dhcps_status() == DHCP_STOPPED) { return false; }