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
c6eca690
Commit
c6eca690
authored
Dec 04, 2017
by
antirez
Browse files
Remove useless variable check from luaCreateFunction().
The block is already inside if (allow_dup).
parent
68681f2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
c6eca690
...
...
@@ -1172,7 +1172,7 @@ int luaCreateFunction(client *c, lua_State *lua, char *funcname, robj *body, int
if
(
allow_dup
)
{
sds
sha
=
sdsnewlen
(
funcname
+
2
,
40
);
if
(
allow_dup
&&
dictFind
(
server
.
lua_scripts
,
sha
)
!=
NULL
)
{
if
(
dictFind
(
server
.
lua_scripts
,
sha
)
!=
NULL
)
{
sdsfree
(
sha
);
return
C_OK
;
}
...
...
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