diff options
author | antirez <antirez@gmail.com> | 2016-11-16 14:13:13 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-12-06 09:06:20 +0100 |
commit | 4a64bc3e40f7ee53006ce0e48f735353a29a7bdc (patch) | |
tree | bb0b11612a6d8c6dd9d60ecaedce97b8a6fe1731 | |
parent | 61c5f4eccb645b05f33203fe8aac72bd4fc0e623 (diff) | |
download | redis-4a64bc3e40f7ee53006ce0e48f735353a29a7bdc.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 46dc27b2e..7598e626b 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); |