Removed unused variable and fixed grammer

This commit is contained in:
Erik Dubbelboer 2015-07-06 21:15:08 +02:00
parent 5e04189887
commit 32bfa7c41f
1 changed files with 2 additions and 5 deletions

View File

@ -389,8 +389,6 @@ int clusterLockConfig(char *filename) {
} }
void clusterInit(void) { void clusterInit(void) {
int saveconf = 0;
server.cluster = zmalloc(sizeof(clusterState)); server.cluster = zmalloc(sizeof(clusterState));
server.cluster->myself = NULL; server.cluster->myself = NULL;
server.cluster->currentEpoch = 0; server.cluster->currentEpoch = 0;
@ -425,9 +423,8 @@ void clusterInit(void) {
redisLog(REDIS_NOTICE,"No cluster configuration found, I'm %.40s", redisLog(REDIS_NOTICE,"No cluster configuration found, I'm %.40s",
myself->name); myself->name);
clusterAddNode(myself); clusterAddNode(myself);
saveconf = 1; clusterSaveConfigOrDie(1);
} }
if (saveconf) clusterSaveConfigOrDie(1);
/* We need a listening TCP port for our cluster messaging needs. */ /* We need a listening TCP port for our cluster messaging needs. */
server.cfd_count = 0; server.cfd_count = 0;
@ -472,7 +469,7 @@ void clusterInit(void) {
/* Reset a node performing a soft or hard reset: /* Reset a node performing a soft or hard reset:
* *
* 1) All other nodes are forget. * 1) All other nodes are forgotten.
* 2) All the assigned / open slots are released. * 2) All the assigned / open slots are released.
* 3) If the node is a slave, it turns into a master. * 3) If the node is a slave, it turns into a master.
* 5) Only for hard reset: a new Node ID is generated. * 5) Only for hard reset: a new Node ID is generated.