diff options
author | antirez <antirez@gmail.com> | 2016-11-16 14:13:13 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-11-16 14:13:13 +0100 |
commit | 92958df3b1306fb787d3eeb21889ba91d6fb7168 (patch) | |
tree | b94bfcc3bd5187fd76de41ba3ef967dd42396239 | |
parent | 0ee28ae40ccf834d949f65287cf466047b41018f (diff) | |
download | redis-92958df3b1306fb787d3eeb21889ba91d6fb7168.tar.gz |
Cluster: handle zero bytes at the end of nodes.conf.
-rw-r--r-- | src/cluster.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cluster.c b/src/cluster.c index 9d53c9812..2dd3344c6 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -129,7 +129,7 @@ int clusterLoadConfig(char *filename) { /* Skip blank lines, they can be created either by users manually * editing nodes.conf or by the config writing process if stopped * before the truncate() call. */ - if (line[0] == '\n') continue; + if (line[0] == '\n' || line[0] == '\0') continue; /* Split the line into arguments for processing. */ argv = sdssplitargs(line,&argc); |