summaryrefslogtreecommitdiff
path: root/ares__get_hostent.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__get_hostent.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__get_hostent.c')
-rw-r--r--ares__get_hostent.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ares__get_hostent.c b/ares__get_hostent.c
index 298df09..94428ee 100644
--- a/ares__get_hostent.c
+++ b/ares__get_hostent.c
@@ -1,5 +1,5 @@
-/* Copyright 1998, 2010 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
@@ -31,6 +31,7 @@
#include "ares.h"
#include "inet_net_pton.h"
+#include "ares_nowarn.h"
#include "ares_private.h"
int ares__get_hostent(FILE *fp, int family, struct hostent **host)
@@ -219,8 +220,8 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
break;
/* Copy actual network address family and length. */
- hostent->h_addrtype = addr.family;
- hostent->h_length = (int)addrlen;
+ hostent->h_addrtype = aresx_sitoss(addr.family);
+ hostent->h_length = aresx_uztoss(addrlen);
/* Free line buffer. */
free(line);