summaryrefslogtreecommitdiff
path: root/ares_gethostbyname.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-08-20 23:05:14 +0200
committerYang Tse <yangsita@gmail.com>2011-08-20 23:05:14 +0200
commit14eb79f66024f06f0db6884715c2a3eed36f50e5 (patch)
treeb6ec89fb19cc55d5b0e6403c734b76b52afe3838 /ares_gethostbyname.c
parent34d5d7696968e3d919f84b3210167073b4d3e33c (diff)
downloadc-ares-14eb79f66024f06f0db6884715c2a3eed36f50e5.tar.gz
c-ares-14eb79f66024f06f0db6884715c2a3eed36f50e5.tar.bz2
c-ares-14eb79f66024f06f0db6884715c2a3eed36f50e5.zip
warnings: fix some 'conversion may lose significant bits' compiler warnings
Diffstat (limited to 'ares_gethostbyname.c')
-rw-r--r--ares_gethostbyname.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ares_gethostbyname.c b/ares_gethostbyname.c
index ad89dc2..4869402 100644
--- a/ares_gethostbyname.c
+++ b/ares_gethostbyname.c
@@ -1,5 +1,5 @@
-/* Copyright 1998 by the Massachusetts Institute of Technology.
+/* Copyright 1998, 2011 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
@@ -49,6 +49,7 @@
#include "inet_net_pton.h"
#include "bitncmp.h"
#include "ares_platform.h"
+#include "ares_nowarn.h"
#include "ares_private.h"
#ifdef WATT32
@@ -300,7 +301,7 @@ static int fake_hostent(const char *name, int family,
/* Fill in the rest of the host structure and terminate the query. */
addrs[1] = NULL;
hostent.h_aliases = aliases;
- hostent.h_addrtype = family;
+ hostent.h_addrtype = aresx_sitoss(family);
hostent.h_addr_list = addrs;
callback(arg, ARES_SUCCESS, 0, &hostent);