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), ...@@ -70,7 +70,7 @@ isc_tcp_accept_fn(IscHandlerList *UNUSED(hl),
if ((fd = accept(scb->fd, if ((fd = accept(scb->fd,
(struct sockaddr *) NULL, (struct sockaddr *) NULL,
(int *) NULL)) < 0) (socklen_t *) NULL)) < 0)
return NULL; return NULL;
new_scb = isc_createtcp(scb->cfg, fd); new_scb = isc_createtcp(scb->cfg, fd);
...@@ -152,9 +152,8 @@ isc_mktcpaddress(const char *address, ...@@ -152,9 +152,8 @@ isc_mktcpaddress(const char *address,
else if (isdigit((int)(unsigned char)address[0])) else if (isdigit((int)(unsigned char)address[0]))
{ {
addr.sin_family = AF_INET; addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(address); if (!inet_aton(address, &addr.sin_addr))
if (addr.sin_addr.s_addr == INADDR_NONE) return NULL;
return NULL;
} }
else if ((hp = gethostbyname(address)) == NULL) else if ((hp = gethostbyname(address)) == NULL)
return 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