summaryrefslogtreecommitdiff
path: root/src/cluster.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cluster.c')
-rw-r--r--src/cluster.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cluster.c b/src/cluster.c
index 42666746d..02b6c2cfd 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -276,11 +276,9 @@ int clusterLoadConfig(char *filename) {
} else {
start = stop = atoi(argv[j]);
}
- if (start < 0 || start >= CLUSTER_SLOTS) {
- sdsfreesplitres(argv,argc);
- goto fmterr;
- }
- if (stop < 0 || stop >= CLUSTER_SLOTS) {
+ if (start < 0 || start >= CLUSTER_SLOTS ||
+ stop < 0 || stop >= CLUSTER_SLOTS)
+ {
sdsfreesplitres(argv,argc);
goto fmterr;
}