]> granicus.if.org Git - curl/commitdiff
Fix compiler warning
authorYang Tse <yangsita@gmail.com>
Sat, 17 Dec 2005 23:34:21 +0000 (23:34 +0000)
committerYang Tse <yangsita@gmail.com>
Sat, 17 Dec 2005 23:34:21 +0000 (23:34 +0000)
ares/adig.c

index c09920ba061db235e49163d7a287222e9f6063a1..b5ee38f2c7a4df8fbf792dc5dfe0c2c7bff3469b 100644 (file)
@@ -227,7 +227,7 @@ int main(int argc, char **argv)
           /* Set the TCP port number. */
           if (!isdigit((unsigned char)*optarg))
             usage();
-          options.tcp_port = strtol(optarg, NULL, 0);
+          options.tcp_port = (unsigned short)strtol(optarg, NULL, 0);
           optmask |= ARES_OPT_TCP_PORT;
           break;
 
@@ -235,7 +235,7 @@ int main(int argc, char **argv)
           /* Set the UDP port number. */
           if (!isdigit((unsigned char)*optarg))
             usage();
-          options.udp_port = strtol(optarg, NULL, 0);
+          options.udp_port = (unsigned short)strtol(optarg, NULL, 0);
           optmask |= ARES_OPT_UDP_PORT;
           break;
         }