Skip to content

Commit 0b797e2

Browse files
committed
cppcheck:
[src/ngx_stream_lua_socket_tcp.c:1173]: (warning) Logical conjunction always evaluates to false: n < 1 && n > 4.
1 parent 9f0cc4d commit 0b797e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/ngx_stream_lua_socket_tcp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ ngx_stream_lua_socket_tcp_sslhandshake(lua_State *L)
11701170
/* Lua function arguments: self [,session] [,host] [,verify] */
11711171

11721172
n = lua_gettop(L);
1173-
if (n < 1 && n > 4) {
1173+
if (n < 1 || n > 4) {
11741174
return luaL_error(L, "ngx.socket connect: expecting 1 ~ 4 "
11751175
"arguments (including the object), but seen %d", n);
11761176
}

0 commit comments

Comments
 (0)