summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-05-02 17:20:49 +0200
committerantirez <antirez@gmail.com>2013-05-02 17:20:49 +0200
commit0d9c1f536bd26244f94add211138568135ed623a (patch)
tree35622a35130387b53839f6e802eeb17ca94850c9
parent649b304e0f01d59e9ee3eb6fb522e1cc9c8e1940 (diff)
downloadredis-0d9c1f536bd26244f94add211138568135ed623a.tar.gz
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.
-rw-r--r--src/config.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/config.c b/src/config.c
index ec51766ee..27c3f48c8 100644
--- a/src/config.c
+++ b/src/config.c
@@ -532,11 +532,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;