Fixed typo in variable name (#10347)

This commit is contained in:
Madelyn Olson 2022-02-26 19:52:09 -08:00 committed by GitHub
parent 1dc89e2d02
commit 35fccd875a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -4111,7 +4111,7 @@ void addInfoSectionsToDict(dict *section_dict, char **sections);
void sentinelInfoCommand(client *c) {
char *sentinel_sections[] = {"server", "clients", "cpu", "stats", "sentinel", NULL};
int sec_all = 0, sec_everything = 0;
static dict *cached_all_info_sectoins = NULL;
static dict *cached_all_info_sections = NULL;
/* Get requested section list. */
dict *sections_dict = genInfoSectionDict(c->argv+1, c->argc-1, sentinel_sections, &sec_all, &sec_everything);
@ -4135,11 +4135,11 @@ void sentinelInfoCommand(client *c) {
if (sec_all || sec_everything) {
releaseInfoSectionDict(sections_dict);
/* We cache this dict as an optimization. */
if (!cached_all_info_sectoins) {
cached_all_info_sectoins = dictCreate(&stringSetDictType);
addInfoSectionsToDict(cached_all_info_sectoins, sentinel_sections);
if (!cached_all_info_sections) {
cached_all_info_sections = dictCreate(&stringSetDictType);
addInfoSectionsToDict(cached_all_info_sections, sentinel_sections);
}
sections_dict = cached_all_info_sectoins;
sections_dict = cached_all_info_sections;
}
sds info = genRedisInfoString(sections_dict, 0, 0);
@ -4182,7 +4182,7 @@ void sentinelInfoCommand(client *c) {
}
dictReleaseIterator(di);
}
if (sections_dict != cached_all_info_sectoins)
if (sections_dict != cached_all_info_sections)
releaseInfoSectionDict(sections_dict);
addReplyBulkSds(c, info);
}