]> git.saurik.com Git - redis.git/commitdiff
preventive conflict resolution to merge pietern/zset-mem
authorantirez <antirez@gmail.com>
Wed, 22 Sep 2010 14:09:30 +0000 (16:09 +0200)
committerantirez <antirez@gmail.com>
Wed, 22 Sep 2010 14:09:30 +0000 (16:09 +0200)
src/t_zset.c

index d944e92329fca9d8f8f0033216dbf7f0ae631706..e3eb83253de0f2a8c51955d6024f6b85a40ca263 100644 (file)
@@ -355,7 +355,8 @@ void zaddGenericCommand(redisClient *c, robj *key, robj *ele, double scoreval, i
             *score = scoreval;
         }
         if (isnan(*score)) {
             *score = scoreval;
         }
         if (isnan(*score)) {
-            addReplyError(c,"resulting score is not a number (NaN)");
+            addReplySds(c,
+                sdsnew("-ERR resulting score is not a number (NaN)\r\n"));
             zfree(score);
             /* Note that we don't need to check if the zset may be empty and
              * should be removed here, as we can only obtain Nan as score if
             zfree(score);
             /* Note that we don't need to check if the zset may be empty and
              * should be removed here, as we can only obtain Nan as score if