]> git.saurik.com Git - redis.git/commitdiff
Move code
authorPieter Noordhuis <pcnoordhuis@gmail.com>
Wed, 27 Apr 2011 11:16:23 +0000 (13:16 +0200)
committerPieter Noordhuis <pcnoordhuis@gmail.com>
Thu, 5 May 2011 14:25:48 +0000 (16:25 +0200)
src/networking.c

index 9d41b380e2aa093abee91959ba44080c71f105d4..48febb09ce26a89080cadde4ce584f8ae2610933 100644 (file)
@@ -720,13 +720,14 @@ int processMultibulkBuffer(redisClient *c) {
             addReplyError(c,"Protocol error: invalid multibulk length");
             setProtocolError(c,pos);
             return REDIS_ERR;
-        } else {
-            pos = (newline-c->querybuf)+2;
-            if (ll <= 0) {
-                c->querybuf = sdsrange(c->querybuf,pos,-1);
-                return REDIS_OK;
-            }
         }
+
+        pos = (newline-c->querybuf)+2;
+        if (ll <= 0) {
+            c->querybuf = sdsrange(c->querybuf,pos,-1);
+            return REDIS_OK;
+        }
+
         c->multibulklen = ll;
 
         /* Setup argv array on client structure */