Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
3fee7e30
Commit
3fee7e30
authored
Jul 15, 2011
by
antirez
Browse files
removed a second copy of rewriteClientCommandVector put inside the source code for a merge error
parent
891f9196
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
3fee7e30
...
@@ -898,30 +898,3 @@ void rewriteClientCommandVector(redisClient *c, int argc, ...) {
...
@@ -898,30 +898,3 @@ void rewriteClientCommandVector(redisClient *c, int argc, ...) {
c
->
argc
=
argc
;
c
->
argc
=
argc
;
va_end
(
ap
);
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
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment