Commit afb11314 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_tcp_accept_fn): The third argument of accept() should be pointer

	to socklen_t, not pointer to int.
(isc_mktcpaddress): Use inet_aton instead of inet_addr.
parent 2ef730fe
......@@ -70,7 +70,7 @@ isc_tcp_accept_fn(IscHandlerList *UNUSED(hl),
if ((fd = accept(scb->fd,
(struct sockaddr *) NULL,
(int *) NULL)) < 0)
(socklen_t *) NULL)) < 0)
return NULL;
new_scb = isc_createtcp(scb->cfg, fd);
......@@ -152,9 +152,8 @@ isc_mktcpaddress(const char *address,
else if (isdigit((int)(unsigned char)address[0]))
{
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(address);
if (addr.sin_addr.s_addr == INADDR_NONE)
return NULL;
if (!inet_aton(address, &addr.sin_addr))
return NULL;
}
else if ((hp = gethostbyname(address)) == NULL)
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment