Cast sentlen to int before comparison wit bufpos.

This is safe since bufpos is small, inside the range of the local
client buffer.
This commit is contained in:
antirez 2015-02-25 10:33:37 +01:00
parent 954151f62b
commit 27c30b0e84

View File

@ -813,7 +813,7 @@ void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) {
/* If the buffer was sent, set bufpos to zero to continue with /* If the buffer was sent, set bufpos to zero to continue with
* the remainder of the reply. */ * the remainder of the reply. */
if (c->sentlen == c->bufpos) { if ((int)c->sentlen == c->bufpos) {
c->bufpos = 0; c->bufpos = 0;
c->sentlen = 0; c->sentlen = 0;
} }