Commit c83a9172 authored by antirez's avatar antirez
Browse files

Sentinel: INFO-CACHE GCC minior code cleanup.

I guess the initial goal of the initialization was to suppress GCC
warning, but if we have to initialize, we can do it with the base-case
value instead of NULL which is never retained.
parent 04223216
......@@ -2796,10 +2796,8 @@ void sentinelCommand(redisClient *c) {
*/
dictType copy_keeper = instancesDictType;
copy_keeper.valDestructor = NULL;
dict *masters_local = NULL;
if (c->argc == 2) {
masters_local = sentinel.masters;
} else {
dict *masters_local = sentinel.masters;
if (c->argc > 2) {
masters_local = dictCreate(&copy_keeper, NULL);
for (int i = 2; i < c->argc; i++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment