summaryrefslogtreecommitdiff
path: root/ares_fds.c
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2004-11-10 14:23:20 +0000
committerGisle Vanem <gvanem@broadpark.no>2004-11-10 14:23:20 +0000
commit6c64cc8669d74d097a6d090a0f82a528bfba7f77 (patch)
tree62f80a4a085de2e0a502dcdfc7b38fbcf5af3a31 /ares_fds.c
parenteadf3e7f0dad52d6a13b1e8615ec110434380236 (diff)
downloadc-ares-6c64cc8669d74d097a6d090a0f82a528bfba7f77.tar.gz
c-ares-6c64cc8669d74d097a6d090a0f82a528bfba7f77.tar.bz2
c-ares-6c64cc8669d74d097a6d090a0f82a528bfba7f77.zip
Replace IsNT with IS_NT().
Return correct timeval in windows_port.c. Squelch gcc warnings: use 'ares_socket_t' in ares_fds.c. Don't cast a 'lvalue' in ares_init.c.
Diffstat (limited to 'ares_fds.c')
-rw-r--r--ares_fds.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/ares_fds.c b/ares_fds.c
index dd91745..0740a98 100644
--- a/ares_fds.c
+++ b/ares_fds.c
@@ -26,7 +26,8 @@
int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
{
struct server_state *server;
- int i, nfds;
+ ares_socket_t nfds;
+ int i;
/* No queries, no file descriptors. */
if (!channel->queries)
@@ -37,19 +38,19 @@ int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
{
server = &channel->servers[i];
if (server->udp_socket != ARES_SOCKET_BAD)
- {
- FD_SET(server->udp_socket, read_fds);
- if (server->udp_socket >= nfds)
- nfds = server->udp_socket + 1;
- }
+ {
+ FD_SET(server->udp_socket, read_fds);
+ if (server->udp_socket >= nfds)
+ nfds = server->udp_socket + 1;
+ }
if (server->tcp_socket != ARES_SOCKET_BAD)
- {
- FD_SET(server->tcp_socket, read_fds);
- if (server->qhead)
- FD_SET(server->tcp_socket, write_fds);
- if (server->tcp_socket >= nfds)
- nfds = server->tcp_socket + 1;
- }
+ {
+ FD_SET(server->tcp_socket, read_fds);
+ if (server->qhead)
+ FD_SET(server->tcp_socket, write_fds);
+ if (server->tcp_socket >= nfds)
+ nfds = server->tcp_socket + 1;
+ }
}
- return nfds;
+ return (int)nfds;
}