Remove remaining uses of deprecated inet_addr() function.

This commit is contained in:
Petr Menšík
2021-08-10 22:21:01 +01:00
committed by Simon Kelley
parent 3ca4995d34
commit fcb4dcaf7c
4 changed files with 10 additions and 7 deletions

View File

@@ -922,7 +922,7 @@ void dhcp_read_ethers(void)
if (!*cp)
{
if ((addr.s_addr = inet_addr(ip)) == (in_addr_t)-1)
if (inet_pton(AF_INET, ip, &addr.s_addr) < 1)
{
my_syslog(MS_DHCP | LOG_ERR, _("bad address at %s line %d"), ETHERSFILE, lineno);
continue;