aboutsummaryrefslogtreecommitdiff
path: root/ares/ares_send.c
diff options
context:
space:
mode:
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;