Skip to content

Commit 4969b87

Browse files
committed
style: preserved a blank line after the goto labels.
1 parent 790e57d commit 4969b87

10 files changed

+32
-0
lines changed

src/ngx_http_lua_cache.c

+2
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ ngx_http_lua_cache_loadbuffer(ngx_http_request_t *r, lua_State *L,
193193
return NGX_OK;
194194

195195
error:
196+
196197
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
197198
"failed to load inlined Lua code: %s", err);
198199
lua_settop(L, n);
@@ -284,6 +285,7 @@ ngx_http_lua_cache_loadfile(ngx_http_request_t *r, lua_State *L,
284285
return NGX_OK;
285286

286287
error:
288+
287289
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
288290
"failed to load external Lua file \"%s\": %s", script, err);
289291

src/ngx_http_lua_contentby.c

+1
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ ngx_http_lua_content_run_posted_threads(lua_State *L, ngx_http_request_t *r,
346346
}
347347

348348
done:
349+
349350
if (n == 1) {
350351
return NGX_DONE;
351352
}

src/ngx_http_lua_headers_in.c

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_lua_header_val_t *hv,
147147
matched = NULL;
148148

149149
retry:
150+
150151
part = &r->headers_in.headers.part;
151152
h = part->elts;
152153

@@ -216,6 +217,7 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_lua_header_val_t *hv,
216217
}
217218

218219
new_header:
220+
219221
h = ngx_list_push(&r->headers_in.headers);
220222

221223
if (h == NULL) {

src/ngx_http_lua_headers_out.c

+1
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ ngx_http_set_builtin_multi_header(ngx_http_request_t *r,
326326
}
327327

328328
create:
329+
329330
ph = ngx_array_push(pa);
330331
if (ph == NULL) {
331332
return NGX_ERROR;

src/ngx_http_lua_output.c

+1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ ngx_http_lua_calc_strlen_in_table(lua_State *L, int index, int arg_i,
358358
default:
359359

360360
bad_type:
361+
361362
msg = lua_pushfstring(L, "bad data type %s found",
362363
lua_typename(L, type));
363364
return luaL_argerror(L, arg_i, msg);

src/ngx_http_lua_regex.c

+8
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ ngx_http_lua_ngx_re_match_helper(lua_State *L, int wantcaps)
467467
}
468468

469469
exec:
470+
470471
if (pcre_fullinfo(re_comp.regex, NULL, PCRE_INFO_NAMECOUNT,
471472
&name_count) != 0)
472473
{
@@ -629,6 +630,7 @@ ngx_http_lua_ngx_re_match_helper(lua_State *L, int wantcaps)
629630
return 1;
630631

631632
error:
633+
632634
if (!(flags & NGX_LUA_RE_COMPILE_ONCE)) {
633635
if (sd) {
634636
ngx_http_lua_regex_free_study_data(pool, sd);
@@ -923,6 +925,7 @@ ngx_http_lua_ngx_re_gmatch(lua_State *L)
923925
}
924926

925927
compiled:
928+
926929
lua_settop(L, 1);
927930

928931
ctx = lua_newuserdata(L, sizeof(ngx_http_lua_regex_ctx_t));
@@ -963,6 +966,7 @@ ngx_http_lua_ngx_re_gmatch(lua_State *L)
963966
return 1;
964967

965968
error:
969+
966970
if (!(flags & NGX_LUA_RE_COMPILE_ONCE)) {
967971
if (sd) {
968972
ngx_http_lua_regex_free_study_data(pool, sd);
@@ -1159,6 +1163,7 @@ ngx_http_lua_ngx_re_gmatch_iterator(lua_State *L)
11591163
return 1;
11601164

11611165
error:
1166+
11621167
lua_pushinteger(L, -1);
11631168
lua_replace(L, lua_upvalueindex(3));
11641169

@@ -1656,6 +1661,7 @@ ngx_http_lua_ngx_re_sub_helper(lua_State *L, unsigned global)
16561661
}
16571662

16581663
exec:
1664+
16591665
count = 0;
16601666
offset = 0;
16611667
cp_offset = 0;
@@ -1878,6 +1884,7 @@ ngx_http_lua_ngx_re_sub_helper(lua_State *L, unsigned global)
18781884
return 2;
18791885

18801886
error:
1887+
18811888
if (!(flags & NGX_LUA_RE_COMPILE_ONCE)) {
18821889
if (sd) {
18831890
ngx_http_lua_regex_free_study_data(pool, sd);
@@ -2242,6 +2249,7 @@ ngx_http_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len,
22422249
return re;
22432250

22442251
error:
2252+
22452253
p = ngx_snprintf(errstr, errstr_size - 1, "%s", msg);
22462254
*p = '\0';
22472255

src/ngx_http_lua_req_body.c

+1
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,7 @@ ngx_http_lua_ngx_req_set_body_file(lua_State *L)
10101010
dd("buf file: %p, f:%u", b->file, b->in_file);
10111011

10121012
set_header:
1013+
10131014
/* override input header Content-Length (value must be null terminated) */
10141015

10151016
value.data = ngx_palloc(r->pool, NGX_OFF_T_LEN + 1);

src/ngx_http_lua_shdict.c

+9
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ ngx_http_lua_shdict_init_zone(ngx_shm_zone_t *shm_zone, void *data)
9696
#endif
9797

9898
done:
99+
99100
dd("get lmcf");
100101

101102
lmcf = ctx->main_conf;
@@ -971,6 +972,7 @@ ngx_http_lua_shdict_set_helper(lua_State *L, int flags)
971972
}
972973

973974
replace:
975+
974976
if (value.data && value.len == (size_t) sd->value_len) {
975977

976978
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, ctx->log, 0,
@@ -1015,6 +1017,7 @@ ngx_http_lua_shdict_set_helper(lua_State *L, int flags)
10151017
"NOT matched, removing it first");
10161018

10171019
remove:
1020+
10181021
ngx_queue_remove(&sd->queue);
10191022

10201023
node = (ngx_rbtree_node_t *)
@@ -1027,6 +1030,7 @@ ngx_http_lua_shdict_set_helper(lua_State *L, int flags)
10271030
}
10281031

10291032
insert:
1033+
10301034
/* rc == NGX_DECLINED or value size unmatch */
10311035

10321036
if (value.data == NULL) {
@@ -1084,6 +1088,7 @@ ngx_http_lua_shdict_set_helper(lua_State *L, int flags)
10841088
}
10851089

10861090
allocated:
1091+
10871092
sd = (ngx_http_lua_shdict_node_t *) &node->color;
10881093

10891094
node->key = hash;
@@ -1479,6 +1484,7 @@ ngx_http_lua_ffi_shdict_store(ngx_shm_zone_t *zone, int op, u_char *key,
14791484
}
14801485

14811486
replace:
1487+
14821488
if (str_value_buf && str_value_len == (size_t) sd->value_len) {
14831489

14841490
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, ctx->log, 0,
@@ -1520,6 +1526,7 @@ ngx_http_lua_ffi_shdict_store(ngx_shm_zone_t *zone, int op, u_char *key,
15201526
"NOT matched, removing it first");
15211527

15221528
remove:
1529+
15231530
ngx_queue_remove(&sd->queue);
15241531

15251532
node = (ngx_rbtree_node_t *)
@@ -1532,6 +1539,7 @@ ngx_http_lua_ffi_shdict_store(ngx_shm_zone_t *zone, int op, u_char *key,
15321539
}
15331540

15341541
insert:
1542+
15351543
/* rc == NGX_DECLINED or value size unmatch */
15361544

15371545
if (str_value_buf == NULL) {
@@ -1583,6 +1591,7 @@ ngx_http_lua_ffi_shdict_store(ngx_shm_zone_t *zone, int op, u_char *key,
15831591
}
15841592

15851593
allocated:
1594+
15861595
sd = (ngx_http_lua_shdict_node_t *) &node->color;
15871596

15881597
node->key = hash;

src/ngx_http_lua_socket_tcp.c

+2
Original file line numberDiff line numberDiff line change
@@ -1615,6 +1615,7 @@ ngx_http_lua_socket_tcp_read(ngx_http_request_t *r,
16151615
#endif
16161616

16171617
success:
1618+
16181619
ngx_http_lua_socket_handle_read_success(r, u);
16191620
return NGX_OK;
16201621
}
@@ -4458,6 +4459,7 @@ ngx_http_lua_socket_push_input_data(ngx_http_request_t *r,
44584459
ngx_pfree(r->pool, p);
44594460

44604461
done:
4462+
44614463
if (nbufs > 1 && ll) {
44624464
dd("recycle buffers: %d", (int) (nbufs - 1));
44634465

src/ngx_http_lua_util.c

+5
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ ngx_http_lua_send_http10_headers(ngx_http_request_t *r,
620620
}
621621

622622
send:
623+
623624
rc = ngx_http_send_header(r);
624625
return rc;
625626
}
@@ -1229,6 +1230,7 @@ ngx_http_lua_run_thread(lua_State *L, ngx_http_request_t *r,
12291230
success = 1;
12301231

12311232
user_co_done:
1233+
12321234
nrets = lua_gettop(ctx->cur_co_ctx->co);
12331235

12341236
next_coctx = ctx->cur_co_ctx->parent_co_ctx;
@@ -1424,6 +1426,7 @@ ngx_http_lua_run_thread(lua_State *L, ngx_http_request_t *r,
14241426
return NGX_ERROR;
14251427

14261428
no_parent:
1429+
14271430
lua_settop(L, 0);
14281431

14291432
ctx->cur_co_ctx->co_status = NGX_HTTP_LUA_CO_DEAD;
@@ -1440,6 +1443,7 @@ ngx_http_lua_run_thread(lua_State *L, ngx_http_request_t *r,
14401443
return r->header_sent ? NGX_ERROR : NGX_HTTP_INTERNAL_SERVER_ERROR;
14411444

14421445
done:
1446+
14431447
if (ctx->entered_content_phase && r->connection->fd != -1) {
14441448
rc = ngx_http_lua_send_chain_link(r, ctx,
14451449
NULL /* last_buf */);
@@ -1543,6 +1547,7 @@ ngx_http_lua_wev_handler(ngx_http_request_t *r)
15431547
/* ctx->flushing_coros == 0 */
15441548

15451549
useless:
1550+
15461551
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
15471552
"useless lua write event handler");
15481553

0 commit comments

Comments
 (0)