From 27c30b0e84224cfc5f4189c26e16800f3e0dcd27 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 25 Feb 2015 10:33:37 +0100 Subject: [PATCH] Cast sentlen to int before comparison wit bufpos. This is safe since bufpos is small, inside the range of the local client buffer. --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }