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
12b56a96
Commit
12b56a96
authored
Sep 10, 2014
by
antirez
Browse files
luaRedisGenericCommand() cached argv handling simplified.
As discussed in issue #1945.
parent
99871803
Changes
1
Show whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
12b56a96
...
...
@@ -222,10 +222,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
}
/* Build the arguments vector */
if
(
!
argv
)
{
argv
=
zmalloc
(
sizeof
(
robj
*
)
*
argc
);
argv_size
=
argc
;
}
else
if
(
argv_size
<
argc
)
{
if
(
argv_size
<
argc
)
{
argv
=
zrealloc
(
argv
,
sizeof
(
robj
*
)
*
argc
);
argv_size
=
argc
;
}
...
...
@@ -403,6 +400,7 @@ cleanup:
if
(
c
->
argv
!=
argv
)
{
zfree
(
c
->
argv
);
argv
=
NULL
;
argv_size
=
0
;
}
if
(
raise_error
)
{
...
...
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