diff options
author | antirez <antirez@gmail.com> | 2015-02-25 10:33:37 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-02-25 10:33:37 +0100 |
commit | 27c30b0e84224cfc5f4189c26e16800f3e0dcd27 (patch) | |
tree | ce46660de9f0ae4de9cb609a00423b43294aade2 | |
parent | 954151f62b79a86b90f8b840fe7c1d1df78c71c3 (diff) | |
download | redis-27c30b0e84224cfc5f4189c26e16800f3e0dcd27.tar.gz |
Cast sentlen to int before comparison wit bufpos.
This is safe since bufpos is small, inside the range of the local
client buffer.
-rw-r--r-- | src/networking.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c index 0b69f5408..c844a9995 100644 --- a/src/networking.c +++ b/src/networking.c @@ -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 * the remainder of the reply. */ - if (c->sentlen == c->bufpos) { + if ((int)c->sentlen == c->bufpos) { c->bufpos = 0; c->sentlen = 0; } |