aboutsummaryrefslogtreecommitdiff
path: root/ares/ares_send.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-01 01:42:13 +0000
committerYang Tse <yangsita@gmail.com>2007-02-01 01:42:13 +0000
commit54db98c220255737456b1311cb9534c9e95215c6 (patch)
treea9ee1b3e102a5d9c099068a220412e5989f520d8 /ares/ares_send.c
parent5565f45f5e5213df213336f99d19a471c1ac2632 (diff)
compiler warning fix
Diffstat (limited to 'ares/ares_send.c')
-rw-r--r--ares/ares_send.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ares/ares_send.c b/ares/ares_send.c
index a279ee9ae..89efec089 100644
--- a/ares/ares_send.c
+++ b/ares/ares_send.c
@@ -79,8 +79,8 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
/* Form the TCP query buffer by prepending qlen (as two
* network-order bytes) to qbuf.
*/
- query->tcpbuf[0] = (qlen >> 8) & 0xff;
- query->tcpbuf[1] = qlen & 0xff;
+ query->tcpbuf[0] = (unsigned char)((qlen >> 8) & 0xff);
+ query->tcpbuf[1] = (unsigned char)(qlen & 0xff);
memcpy(query->tcpbuf + 2, qbuf, qlen);
query->tcplen = qlen + 2;