Skip to content

Commit 1ba87ee

Browse files
committed
removed a redundant check in ngx_stream_lua_clfactory_loadfile reported by Ilya Shipitsin in #24 (found by cppcheck).
1 parent 37f646d commit 1ba87ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngx_stream_lua_clfactory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ ngx_stream_lua_clfactory_loadfile(lua_State *L, const char *filename)
639639
sharp = 1;
640640
}
641641

642-
if (c == LUA_SIGNATURE[0] && filename) { /* binary file? */
642+
if (c == LUA_SIGNATURE[0]) { /* binary file? */
643643
lf.f = freopen(filename, "rb", lf.f); /* reopen in binary mode */
644644

645645
if (lf.f == NULL) {

0 commit comments

Comments
 (0)