summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ares_getnameinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c
index 117c6c9..9c48e8f 100644
--- a/ares_getnameinfo.c
+++ b/ares_getnameinfo.c
@@ -305,7 +305,7 @@ static char *lookup_service(unsigned short port, int flags,
strcpy(tmpbuf, sep->s_name);
else
/* get port as a string */
- sprintf(tmpbuf, "%u", ntohs(port));
+ sprintf(tmpbuf, "%u", (unsigned short)ntohs(port));
if (strlen(tmpbuf) < buflen)
/* return it if buffer big enough */
strcpy(buf, tmpbuf);