From c6eca690ee0df88361dd878563fcbc6b1ce214a2 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 4 Dec 2017 10:55:46 +0100 Subject: Remove useless variable check from luaCreateFunction(). The block is already inside if (allow_dup). --- src/scripting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting.c b/src/scripting.c index 9427b7b6b..e6a70e546 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -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; } -- cgit v1.2.1