fix cppcheck warnings

This commit is contained in:
technyon
2023-01-29 16:26:13 +01:00
parent b4607909fe
commit 0af1ab775e
2 changed files with 1141 additions and 2 deletions

View File

@@ -26,9 +26,12 @@ int DhcpClass::beginWithDHCP(uint8_t *mac, unsigned long timeout, unsigned long
void DhcpClass::reset_DHCP_lease()
{
// zero out _dhcpSubnetMask, _dhcpGatewayIp, _dhcpLocalIp, _dhcpDhcpServerIp, _dhcpDnsServerIp
memset(_dhcpLocalIp, 0, 20);
memset(_dhcpLocalIp, 0, sizeof(_dhcpLocalIp));
memset(_dhcpGatewayIp, 0, sizeof(_dhcpGatewayIp));
memset(_dhcpSubnetMask, 0, sizeof(_dhcpSubnetMask));
memset(_dhcpDnsServerIp, 0, sizeof(_dhcpDnsServerIp));
memset(_dhcpLocalIp, 0, sizeof(_dhcpLocalIp));
}
//return:0 on error, 1 if request is sent and response is received
int DhcpClass::request_DHCP_lease()
{