Commit b05d2516 authored by antirez's avatar antirez
Browse files

CONFIG SET server.masterauth aesthetic change.

This is just to make the code exactly like the above instance used for
requirepass. No actual change nor the original code violated the Redis
coding style.
parent b60465eb
......@@ -514,11 +514,7 @@ void configSetCommand(redisClient *c) {
server.requirepass = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
} else if (!strcasecmp(c->argv[2]->ptr,"masterauth")) {
zfree(server.masterauth);
if (sdslen(o->ptr)) {
server.masterauth = zstrdup(o->ptr);
} else {
server.masterauth = NULL;
}
server.masterauth = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
} else if (!strcasecmp(c->argv[2]->ptr,"maxmemory")) {
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
ll < 0) goto badfmt;
......
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