From 8b070b5d1285b988d6413699f92a941475bea54c Mon Sep 17 00:00:00 2001 From: Guy Benoish Date: Mon, 31 Oct 2016 15:08:17 +0200 Subject: Fixed wrong sizeof(client) in object.c --- src/object.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/object.c b/src/object.c index 210e980e7..4d14ae8d9 100644 --- a/src/object.c +++ b/src/object.c @@ -828,9 +828,9 @@ struct redisMemOverhead *getMemoryOverheadData(void) { listRewind(server.slaves,&li); while((ln = listNext(&li))) { - client *client = listNodeValue(ln); - mem += getClientOutputBufferMemoryUsage(client); - mem += sdsAllocSize(client->querybuf); + client *c = listNodeValue(ln); + mem += getClientOutputBufferMemoryUsage(c); + mem += sdsAllocSize(c->querybuf); mem += sizeof(client); } } @@ -844,11 +844,11 @@ struct redisMemOverhead *getMemoryOverheadData(void) { listRewind(server.clients,&li); while((ln = listNext(&li))) { - client *client = listNodeValue(ln); - if (client->flags & CLIENT_SLAVE) + client *c = listNodeValue(ln); + if (c->flags & CLIENT_SLAVE) continue; - mem += getClientOutputBufferMemoryUsage(client); - mem += sdsAllocSize(client->querybuf); + mem += getClientOutputBufferMemoryUsage(c); + mem += sdsAllocSize(c->querybuf); mem += sizeof(client); } } -- cgit v1.2.1