From b05d2516fef38e01bac297d42e446cc36fa96dd4 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 2 May 2013 17:20:49 +0200 Subject: [PATCH] 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. --- src/config.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index 2dcfa7cd..06441210 100644 --- a/src/config.c +++ b/src/config.c @@ -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;