Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
04223216
Commit
04223216
authored
Dec 10, 2014
by
antirez
Browse files
Sentinel: removed useless flag var from INFO-CACHE.
parent
7576a27d
Changes
1
Show whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
04223216
...
@@ -2797,12 +2797,10 @@ void sentinelCommand(redisClient *c) {
...
@@ -2797,12 +2797,10 @@ void sentinelCommand(redisClient *c) {
dictType copy_keeper = instancesDictType;
dictType copy_keeper = instancesDictType;
copy_keeper.valDestructor = NULL;
copy_keeper.valDestructor = NULL;
dict *masters_local = NULL;
dict *masters_local = NULL;
int needs_cleanup = 0;
if (c->argc == 2) {
if (c->argc == 2) {
masters_local = sentinel.masters;
masters_local = sentinel.masters;
} else {
} else {
masters_local = dictCreate(©_keeper, NULL);
masters_local = dictCreate(©_keeper, NULL);
needs_cleanup = 1;
for (int i = 2; i < c->argc; i++) {
for (int i = 2; i < c->argc; i++) {
sentinelRedisInstance *ri;
sentinelRedisInstance *ri;
...
@@ -2841,7 +2839,7 @@ void sentinelCommand(redisClient *c) {
...
@@ -2841,7 +2839,7 @@ void sentinelCommand(redisClient *c) {
dictReleaseIterator(sdi);
dictReleaseIterator(sdi);
}
}
dictReleaseIterator(di);
dictReleaseIterator(di);
if (
needs_cleanup
) dictRelease(masters_local);
if (
masters_local != sentinel.masters
) dictRelease(masters_local);
} else {
} else {
addReplyErrorFormat(c,"Unknown sentinel subcommand '%s'",
addReplyErrorFormat(c,"Unknown sentinel subcommand '%s'",
(char*)c->argv[1]->ptr);
(char*)c->argv[1]->ptr);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment