Correction on string comparison
authorGraeme Fowler <graemef@exim.org>
Tue, 6 Mar 2018 15:36:55 +0000 (15:36 +0000)
committerGraeme Fowler <graemef@exim.org>
Tue, 6 Mar 2018 15:36:55 +0000 (15:36 +0000)
src/src/lookups/redis.c

index c36b1bd..dcd1b65 100644 (file)
@@ -243,7 +243,7 @@ switch (redis_reply->type)
     *errmsg = string_sprintf("REDIS: lookup result failed: %s\n", redis_reply->str);
 
     /* trap MOVED cluster responses and follow them */
-    if (Ustrncmp(redis_reply->str, "MOVED", 5))
+    if (Ustrncmp(redis_reply->str, "MOVED", 5) == 0)
       {
       DEBUG(D_lookup)
         debug_printf("REDIS: cluster redirect %s\n", redis_reply->str);