]> git.saurik.com Git - redis.git/commitdiff
some dead code removed
authorantirez <antirez@gmail.com>
Fri, 16 Oct 2009 21:40:47 +0000 (23:40 +0200)
committerantirez <antirez@gmail.com>
Fri, 16 Oct 2009 21:40:47 +0000 (23:40 +0200)
redis.c

diff --git a/redis.c b/redis.c
index 74986528c3573e690dfd158a852d506794ea5249..3077badb1562da0b7c3a166a5c60c2cb8db160a5 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -1360,10 +1360,6 @@ static int processCommand(redisClient *c) {
                 }
                 c->argc--;
                 c->bulklen = bulklen+2; /* add two bytes for CR+LF */
-                /*
-                if (sdslen(c->querybuf) > 0)
-                    processInputBuffer(c);
-                    */
                 return 1;
             }
         } else {
@@ -1394,10 +1390,6 @@ static int processCommand(redisClient *c) {
                 /* continue below and process the command */
             } else {
                 c->bulklen = -1;
-                /*
-                if (sdslen(c->querybuf) > 0)
-                    processInputBuffer(c);
-                    */
                 return 1;
             }
         }
@@ -1437,7 +1429,10 @@ static int processCommand(redisClient *c) {
         c->argc--;
         c->bulklen = bulklen+2; /* add two bytes for CR+LF */
         /* It is possible that the bulk read is already in the
-         * buffer. Check this condition and handle it accordingly */
+         * buffer. Check this condition and handle it accordingly.
+         * This is just a fast path, alternative to call processInputBuffer().
+         * It's a good idea since the code is small and this condition
+         * happens most of the times. */
         if ((signed)sdslen(c->querybuf) >= c->bulklen) {
             c->argv[c->argc] = createStringObject(c->querybuf,c->bulklen-2);
             c->argc++;