Make vars used only by INFO CLIENTS local to the block.

Related to #4727.
This commit is contained in:
antirez 2018-07-19 12:22:42 +02:00
parent 16b8d364cc
commit 1c95c07596

View File

@ -2955,7 +2955,6 @@ sds genRedisInfoString(char *section) {
time_t uptime = server.unixtime-server.stat_starttime; time_t uptime = server.unixtime-server.stat_starttime;
int j; int j;
struct rusage self_ru, c_ru; struct rusage self_ru, c_ru;
unsigned long lol, bib;
int allsections = 0, defsections = 0; int allsections = 0, defsections = 0;
int sections = 0; int sections = 0;
@ -3034,6 +3033,7 @@ sds genRedisInfoString(char *section) {
/* Clients */ /* Clients */
if (allsections || defsections || !strcasecmp(section,"clients")) { if (allsections || defsections || !strcasecmp(section,"clients")) {
unsigned long lol, bib;
getClientsMaxBuffers(&lol,&bib); getClientsMaxBuffers(&lol,&bib);
if (sections++) info = sdscat(info,"\r\n"); if (sections++) info = sdscat(info,"\r\n");
info = sdscatprintf(info, info = sdscatprintf(info,