From 7fe31e4d0053d53b6fdbc58c749dac5c78f23cae Mon Sep 17 00:00:00 2001 From: Yang Tse <yangsita@gmail.com> Date: Fri, 2 Feb 2007 17:16:06 +0000 Subject: [PATCH] compiler warning fix --- ares_getnameinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c index 117c6c9a..9c48e8f9 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);