summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-02-27 22:33:54 +0100
committerantirez <antirez@gmail.com>2015-02-27 22:33:54 +0100
commitc77081a45a7c350428785b6e7fafeb2b57ea4330 (patch)
tree2e522f3fed08267644b92002a1a1ddeb56b9079d
parent4f56f035a70293be6fbc20a0545c1be53a131e7c (diff)
downloadredis-c77081a45a7c350428785b6e7fafeb2b57ea4330.tar.gz
Migrate: replace conditional with pre-computed value.
-rw-r--r--src/cluster.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cluster.c b/src/cluster.c
index c606448f9..df1498bdd 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -4584,7 +4584,7 @@ try_again:
/* On error assume that last_dbid is no longer valid. */
cs->last_dbid = -1;
addReplyErrorFormat(c,"Target instance replied with error: %s",
- (cs->last_dbid != dbid && buf1[0] == '-') ? buf1+1 : buf2+1);
+ (select && buf1[0] == '-') ? buf1+1 : buf2+1);
} else {
/* Update the last_dbid in migrateCachedSocket */
cs->last_dbid = dbid;