summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-07-19 12:22:42 +0200
committerantirez <antirez@gmail.com>2018-07-19 12:23:05 +0200
commit1c95c075966407729648fe676883a75be638824c (patch)
treeff445141f80d9f5b0f0de5e7ec5fe2e6cc5af74b
parent16b8d364cca67f4db0883715869c721317f799af (diff)
downloadredis-1c95c075966407729648fe676883a75be638824c.tar.gz
Make vars used only by INFO CLIENTS local to the block.
Related to #4727.
-rw-r--r--src/server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server.c b/src/server.c
index 251209b70..06826a356 100644
--- a/src/server.c
+++ b/src/server.c
@@ -2955,7 +2955,6 @@ sds genRedisInfoString(char *section) {
time_t uptime = server.unixtime-server.stat_starttime;
int j;
struct rusage self_ru, c_ru;
- unsigned long lol, bib;
int allsections = 0, defsections = 0;
int sections = 0;
@@ -3034,6 +3033,7 @@ sds genRedisInfoString(char *section) {
/* Clients */
if (allsections || defsections || !strcasecmp(section,"clients")) {
+ unsigned long lol, bib;
getClientsMaxBuffers(&lol,&bib);
if (sections++) info = sdscat(info,"\r\n");
info = sdscatprintf(info,