summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-07-15 18:02:45 +0200
committerantirez <antirez@gmail.com>2011-07-15 18:02:45 +0200
commit3fee7e30130ba12be102b8b1e440b3882e2dbd2e (patch)
tree58c63f2ebee138a0f8cc61fef3a4d77605050f08
parent891f9196fcc72faa4419a493543ce2124d622363 (diff)
downloadredis-3fee7e30130ba12be102b8b1e440b3882e2dbd2e.tar.gz
removed a second copy of rewriteClientCommandVector put inside the source code for a merge error
-rw-r--r--src/networking.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/networking.c b/src/networking.c
index 61432a217..b31c89df9 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -898,30 +898,3 @@ void rewriteClientCommandVector(redisClient *c, int argc, ...) {
c->argc = argc;
va_end(ap);
}
-
-void rewriteClientCommandVector(redisClient *c, int argc, ...) {
- va_list ap;
- int j;
- robj **argv; /* The new argument vector */
-
- argv = zmalloc(sizeof(robj*)*argc);
- va_start(ap,argc);
- for (j = 0; j < argc; j++) {
- robj *a;
-
- a = va_arg(ap, robj*);
- argv[j] = a;
- incrRefCount(a);
- }
- /* We free the objects in the original vector at the end, so we are
- * sure that if the same objects are reused in the new vector the
- * refcount gets incremented before it gets decremented. */
- for (j = 0; j < c->argc; j++) decrRefCount(c->argv[j]);
- zfree(c->argv);
- /* Replace argv and argc with our new versions. */
- c->argv = argv;
- c->argc = argc;
- c->cmd = lookupCommand(c->argv[0]->ptr);
- redisAssert(c->cmd != NULL);
- va_end(ap);
-}