]> granicus.if.org Git - curl/commitdiff
fix compiler warning
authorYang Tse <yangsita@gmail.com>
Thu, 11 Mar 2010 18:53:42 +0000 (18:53 +0000)
committerYang Tse <yangsita@gmail.com>
Thu, 11 Mar 2010 18:53:42 +0000 (18:53 +0000)
ares/ares.h
ares/ares_getsock.3
ares/ares_getsock.c
lib/hostares.c

index c514f2516d651d7f3d158ba179a4a5f5ccc3acbc..6d658ad2d32069082f25e13646c224c4cf2137b3 100644 (file)
@@ -368,7 +368,7 @@ CARES_EXTERN int ares_fds(ares_channel channel,
                           fd_set *write_fds);
 
 CARES_EXTERN int ares_getsock(ares_channel channel,
-                              int *socks,
+                              ares_socket_t *socks,
                               int numsocks);
 
 CARES_EXTERN struct timeval *ares_timeout(ares_channel channel,
index 57254cd36cb88ed3c3ecdaa9452bb8b591fc57f9..ef07fb92324461fa599a48a8da9c7226d96d4f0f 100644 (file)
 .\" this software for any purpose.  It is provided "as is"
 .\" without express or implied warranty.
 .\"
-.TH ARES_GETSOCK 3 "22 December 2005"
+.TH ARES_GETSOCK 3 "11 March 2010"
 .SH NAME
-ares_getsock \- get file descriptors to wait on
+ares_getsock \- get socket descriptors to wait on
 .SH SYNOPSIS
 .nf
 .B #include <ares.h>
 .PP
-.B int ares_getsock(ares_channel \fIchannel\fP, int *\fIsocks\fP, 
+.B int ares_getsock(ares_channel \fIchannel\fP, ares_socket_t *\fIsocks\fP,
 .B int \fInumsocks\fP);
 .fi
 .SH DESCRIPTION
 The
 .B ares_getsock
-function retrieves the set of file descriptors which the calling
+function retrieves the set of socket descriptors which the calling
 application should wait on for reading and/or writing for the
 processing of name service queries pending on the name service channel
 identified by
 .IR channel .
-File descriptors will be set in the integer array pointed to by
+Socket descriptors will be set in the socket descriptor array pointed to by
 \fIsocks\fP.
 \fInumsocks\fP is the size of the given array in number of ints.
 
index 1c5e9ff2647ca6bff52dfc9b8102bbd4cde339b1..52aaecd0bca91535249f0d938935a312d619f5bf 100644 (file)
@@ -1,6 +1,6 @@
 /* $Id$ */
 
-/* Copyright (C) 2005 - 2007, Daniel Stenberg
+/* Copyright (C) 2005 - 2010, Daniel Stenberg
  *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted, provided
@@ -23,7 +23,7 @@
 #include "ares_private.h"
 
 int ares_getsock(ares_channel channel,
-                 int *s,
+                 ares_socket_t *socks,
                  int numsocks) /* size of the 'socks' array */
 {
   struct server_state *server;
@@ -32,8 +32,6 @@ int ares_getsock(ares_channel channel,
   int bitmap = 0;
   unsigned int setbits = 0xffffffff;
 
-  ares_socket_t *socks = (ares_socket_t *)s;
-
   /* Are there any active queries? */
   int active_queries = !ares__is_list_empty(&(channel->all_queries));
 
index 2d77a11ca2d1181cf413ad0e3c5acab9cdbc3f7d..3639d086f460be4987ac445a56e5653f34e78b95 100644 (file)
@@ -105,7 +105,7 @@ int Curl_resolv_getsock(struct connectdata *conn,
   struct timeval timebuf;
   struct timeval *timeout;
   int max = ares_getsock(conn->data->state.areschannel,
-                         (int *)socks, numsocks);
+                         (ares_socket_t *)socks, numsocks);
 
 
   maxtime.tv_sec = CURL_TIMEOUT_RESOLVE;
@@ -134,7 +134,7 @@ static int waitperform(struct connectdata *conn, int timeout_ms)
   struct SessionHandle *data = conn->data;
   int nfds;
   int bitmask;
-  int socks[ARES_GETSOCK_MAXNUM];
+  ares_socket_t socks[ARES_GETSOCK_MAXNUM];
   struct pollfd pfd[ARES_GETSOCK_MAXNUM];
   int i;
   int num = 0;