aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-20 14:01:04 +0000
committerYang Tse <yangsita@gmail.com>2007-02-20 14:01:04 +0000
commitbe3c5f0b94e6175e0983f567a604924e517a2e41 (patch)
treebbbc658318bef8a896ffd0141df3e583dd4035c6
parente268e8559ef3da2410ec9160559f607b817e0ff9 (diff)
compiler warning fix
-rw-r--r--lib/socks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/socks.c b/lib/socks.c
index accab029b..cd40d37e9 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -149,7 +149,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
socksreq[0] = 4; /* version (SOCKS4) */
socksreq[1] = 1; /* connect */
- *((unsigned short*)&socksreq[2]) = htons(remote_port);
+ *((unsigned short*)&socksreq[2]) = htons((unsigned short)remote_port);
/* DNS resolve */
{
@@ -552,7 +552,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
}
}
- *((unsigned short*)&socksreq[8]) = htons(remote_port);
+ *((unsigned short*)&socksreq[8]) = htons((unsigned short)remote_port);
{
const int packetsize = 10;