diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2016-10-31 15:34:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-31 15:34:16 +0100 |
commit | fbfa0a12ee8ebe6d6aaee3c2aac3dd2e010af62f (patch) | |
tree | 8491916bd78362e43f9f9a6a6d7829e45c701cb9 | |
parent | f39e7d4d7e8f3a0d5a8eb29e2bc86700a26397fd (diff) | |
parent | 8b070b5d1285b988d6413699f92a941475bea54c (diff) | |
download | redis-fbfa0a12ee8ebe6d6aaee3c2aac3dd2e010af62f.tar.gz |
Merge pull request #3579 from guybe7/unstable
Fixed wrong sizeof(client) in object.c
-rw-r--r-- | src/object.c | 14 |
1 files 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); } } |