Skip to content

Commit 1a1cde4

Browse files
committed
fixed a coding style issue: we did not declare C variables at the beginning of the current code block in ngx_http_lua_del_thread, reported by runner-mei in github issue openresty#93.
1 parent e84711d commit 1a1cde4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ngx_http_lua_util.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,15 @@ ngx_http_lua_del_thread(ngx_http_request_t *r, lua_State *L, int ref,
217217
int force_quit)
218218
{
219219
ngx_http_lua_ctx_t *ctx;
220+
lua_State *cr;
220221

221222
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
222223
"lua deleting thread");
223224

224225
lua_getfield(L, LUA_REGISTRYINDEX, NGX_LUA_CORT_REF);
225226

226227
lua_rawgeti(L, -1, ref);
227-
lua_State *cr = lua_tothread(L, -1);
228+
cr = lua_tothread(L, -1);
228229
lua_pop(L, 1);
229230

230231
dd("cr: %p, force quit: %d", cr, (int) force_quit);

0 commit comments

Comments
 (0)