Skip to content

Commit af130ae

Browse files
chipitsinezhuizhuhaomeng
authored andcommitted
fix dead code found by coverity
*** CID 352755: Control flow issues (DEADCODE) /src/ngx_http_lua_socket_tcp.c: 1541 in ngx_http_lua_socket_tcp_check_busy() 1535 #if (NGX_HTTP_SSL) 1536 1537 static const char * 1538 ngx_http_lua_socket_tcp_check_busy(ngx_http_request_t *r, 1539 ngx_http_lua_socket_tcp_upstream_t *u, unsigned int ops) 1540 { >>> CID 352755: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "u->conn_waiting" inside this statement: "if (ops & SOCKET_OP_CONNECT...". 1541 if ((ops & SOCKET_OP_CONNECT) && u->conn_waiting) { 1542 return "socket busy connecting"; 1543 } 1544 1545 if ((ops & SOCKET_OP_READ) && u->read_waiting) { 1546 return "socket busy reading";
1 parent 8a8e710 commit af130ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ngx_http_lua_socket_tcp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ enum {
166166

167167

168168
enum {
169-
SOCKET_OP_CONNECT,
170-
SOCKET_OP_READ,
171-
SOCKET_OP_WRITE,
172-
SOCKET_OP_RESUME_CONN,
169+
SOCKET_OP_CONNECT = 0x01,
170+
SOCKET_OP_READ = 0x02,
171+
SOCKET_OP_WRITE = 0x04,
172+
SOCKET_OP_RESUME_CONN = 0x08,
173173
};
174174

175175

0 commit comments

Comments
 (0)