Skip to content

style: added blank lines after code block. #1752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ngx_http_lua_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ngx_http_lua_escape_args(u_char *dst, u_char *src, size_t size)
if (escape[*src >> 5] & (1 << (*src & 0x1f))) {
n++;
}

src++;
size--;
}
Expand All @@ -72,6 +73,7 @@ ngx_http_lua_escape_args(u_char *dst, u_char *src, size_t size)
} else {
*dst++ = *src++;
}

size--;
}

Expand Down
2 changes: 2 additions & 0 deletions src/ngx_http_lua_directive.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,13 +1378,15 @@ ngx_http_lua_conf_lua_block_parse(ngx_conf_t *cf, ngx_command_t *cmd)
if (dst == NULL) {
return NGX_CONF_ERROR;
}

dst->len = len;
dst->len--; /* skip the trailing '}' block terminator */

p = ngx_palloc(cf->pool, len);
if (p == NULL) {
return NGX_CONF_ERROR;
}

dst->data = p;

for (i = 0; i < cf->args->nelts; i++) {
Expand Down
1 change: 1 addition & 0 deletions src/ngx_http_lua_headers.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ ngx_http_lua_ngx_resp_get_headers(lua_State *L)
} else {
lua_pushliteral(L, "close");
}

lua_rawset(L, -3);

if (r->chunked) {
Expand Down
3 changes: 3 additions & 0 deletions src/ngx_http_lua_headers_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ ngx_http_lua_validate_host(ngx_str_t *host, ngx_pool_t *pool, ngx_uint_t alloc)
if (dot_pos == i - 1) {
return NGX_DECLINED;
}

dot_pos = i;
break;

Expand Down Expand Up @@ -754,6 +755,7 @@ ngx_http_lua_rm_header_helper(ngx_list_t *l, ngx_list_part_t *cur,
if (part->next == NULL) {
return NGX_ERROR;
}

part = part->next;
}

Expand Down Expand Up @@ -798,6 +800,7 @@ ngx_http_lua_rm_header_helper(ngx_list_t *l, ngx_list_part_t *cur,
if (part->next == NULL) {
return NGX_ERROR;
}

part = part->next;
}

Expand Down
1 change: 1 addition & 0 deletions src/ngx_http_lua_initworkerby.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ ngx_http_lua_init_worker(ngx_cycle_t *cycle)
if (part->next == NULL) {
break;
}

part = part->next;
ofile = part->elts;
i = 0;
Expand Down
1 change: 1 addition & 0 deletions src/ngx_http_lua_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ log_wrapper(ngx_log_t *log, const char *ident, ngx_uint_t level,
if (*p == '/' || *p == '\\') {
name.data = p + 1;
}

p++;
}

Expand Down
3 changes: 3 additions & 0 deletions src/ngx_http_lua_req_body.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ ngx_http_lua_ngx_req_set_body_data(lua_State *L)
if (b->start == NULL) {
return luaL_error(L, "no memory");
}

b->end = b->start + body.len;

b->pos = b->start;
Expand All @@ -454,6 +455,7 @@ ngx_http_lua_ngx_req_set_body_data(lua_State *L)
if (rb->bufs == NULL) {
return luaL_error(L, "no memory");
}

rb->bufs->next = NULL;

b = ngx_create_temp_buf(r->pool, body.len);
Expand Down Expand Up @@ -899,6 +901,7 @@ ngx_http_lua_ngx_req_set_body_file(lua_State *L)
if (rb->bufs == NULL) {
return luaL_error(L, "no memory");
}

rb->bufs->next = NULL;

b = ngx_calloc_buf(r->pool);
Expand Down
1 change: 1 addition & 0 deletions src/ngx_http_lua_socket_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4890,6 +4890,7 @@ ngx_http_lua_req_socket(lua_State *L)
if (rb == NULL) {
return luaL_error(L, "no memory");
}

r->request_body = rb;
}

Expand Down
3 changes: 3 additions & 0 deletions src/ngx_http_lua_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ ngx_http_lua_ngx_escape_sql_str(u_char *dst, u_char *src, size_t size)
break;
}
}

src++;
size--;
}
Expand Down Expand Up @@ -192,9 +193,11 @@ ngx_http_lua_ngx_escape_sql_str(u_char *dst, u_char *src, size_t size)
*dst++ = *src;
break;
}

} else {
*dst++ = *src;
}

src++;
size--;
} /* while (size) */
Expand Down
3 changes: 3 additions & 0 deletions src/ngx_http_lua_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2067,6 +2067,7 @@ ngx_http_lua_escape_uri(u_char *dst, u_char *src, size_t size, ngx_uint_t type)
if (escape[*src >> 5] & (1 << (*src & 0x1f))) {
n++;
}

src++;
size--;
}
Expand All @@ -2084,6 +2085,7 @@ ngx_http_lua_escape_uri(u_char *dst, u_char *src, size_t size, ngx_uint_t type)
} else {
*dst++ = *src++;
}

size--;
}

Expand Down Expand Up @@ -3886,6 +3888,7 @@ ngx_http_lua_init_vm(lua_State **new_vm, lua_State *parent_vm,
if (state == NULL) {
return NGX_ERROR;
}

state->vm = L;
state->count = 1;

Expand Down