Skip to content

Commit 8df9125

Browse files
style: fixed coding style.
1 parent 3096b45 commit 8df9125

26 files changed

+46
-61
lines changed

src/api/ngx_stream_lua_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/* Public API for other Nginx modules */
3030

3131

32-
#define ngx_stream_lua_version 16
32+
#define ngx_stream_lua_version 16
3333

3434

3535
typedef struct {

src/ngx_stream_lua_api.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ ngx_stream_lua_get_global_state(ngx_conf_t *cf)
4242
}
4343

4444

45-
46-
4745
static ngx_int_t ngx_stream_lua_shared_memory_init(ngx_shm_zone_t *shm_zone,
4846
void *data);
4947

@@ -275,7 +273,9 @@ ngx_stream_lua_ffi_req_dst_addr(ngx_stream_lua_request_t *r, char *buf,
275273
"failed to get IPv4 origin addr") - errbuf;
276274
return NGX_ERROR;
277275
}
276+
278277
#if (NGX_HAVE_INET6)
278+
279279
} else if (family == AF_INET6) {
280280
/* IPv6 */
281281
opt_name = IP6T_SO_ORIGINAL_DST;
@@ -286,6 +286,7 @@ ngx_stream_lua_ffi_req_dst_addr(ngx_stream_lua_request_t *r, char *buf,
286286
return NGX_ERROR;
287287
}
288288
#endif
289+
289290
} else {
290291
/* Unsupported address family */
291292
*errbuf_size

src/ngx_stream_lua_args.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,4 @@ ngx_stream_lua_parse_args(lua_State *L, u_char *buf, u_char *last, int max)
156156
}
157157

158158

159-
160-
161159
/* vi:set ft=c ts=4 sw=4 et fdm=marker: */

src/ngx_stream_lua_common.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@ struct ngx_stream_lua_main_conf_s {
246246
};
247247

248248

249-
250-
251249
struct ngx_stream_lua_srv_conf_s {
252250
#if (NGX_STREAM_SSL)
253251
ngx_ssl_t *ssl; /* shared by SSL cosockets */
@@ -330,6 +328,7 @@ struct ngx_stream_lua_srv_conf_s {
330328

331329
};
332330

331+
333332
typedef ngx_stream_lua_srv_conf_t ngx_stream_lua_loc_conf_t;
334333

335334

@@ -360,8 +359,6 @@ struct ngx_stream_lua_posted_thread_s {
360359
};
361360

362361

363-
364-
365362
struct ngx_stream_lua_co_ctx_s {
366363
void *data; /* user state for cosockets */
367364

@@ -527,12 +524,9 @@ typedef struct ngx_stream_lua_ctx_s {
527524
} ngx_stream_lua_ctx_t;
528525

529526

530-
531-
532527
extern ngx_module_t ngx_stream_lua_module;
533528

534529

535-
536530
#endif /* _NGX_STREAM_LUA_COMMON_H_INCLUDED_ */
537531

538532
/* vi:set ft=c ts=4 sw=4 et fdm=marker: */

src/ngx_stream_lua_consts.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,4 @@ ngx_stream_lua_inject_core_consts(lua_State *L)
4747
}
4848

4949

50-
5150
/* vi:set ft=c ts=4 sw=4 et fdm=marker: */

src/ngx_stream_lua_contentby.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ ngx_stream_lua_content_handler(ngx_stream_session_t *s)
208208
}
209209

210210

211-
212-
213211
ngx_int_t
214212
ngx_stream_lua_content_handler_file(ngx_stream_lua_request_t *r)
215213
{

src/ngx_stream_lua_control.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ ngx_stream_lua_inject_control_api(ngx_log_t *log, lua_State *L)
4040
}
4141

4242

43-
44-
4543
static int
4644
ngx_stream_lua_on_abort(lua_State *L)
4745
{

src/ngx_stream_lua_ctx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ ngx_stream_lua_ngx_set_ctx_helper(lua_State *L, ngx_stream_lua_request_t *r,
5555
lua_pop(L, 1);
5656

5757
pool = r->pool;
58-
if (ngx_stream_lua_ngx_ctx_add_cleanup(r, pool, ctx->ctx_ref) != NGX_OK) {
58+
if (ngx_stream_lua_ngx_ctx_add_cleanup(r, pool, ctx->ctx_ref) != NGX_OK)
59+
{
5960
return luaL_error(L, "no memory");
6061
}
6162

@@ -160,8 +161,8 @@ ngx_stream_lua_ffi_set_ctx_ref(ngx_stream_lua_request_t *r, int ref)
160161

161162

162163
static ngx_int_t
163-
ngx_stream_lua_ngx_ctx_add_cleanup(ngx_stream_lua_request_t *r, ngx_pool_t *pool,
164-
int ref)
164+
ngx_stream_lua_ngx_ctx_add_cleanup(ngx_stream_lua_request_t *r,
165+
ngx_pool_t *pool, int ref)
165166
{
166167
lua_State *L;
167168
ngx_pool_cleanup_t *cln;

src/ngx_stream_lua_directive.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,6 @@ ngx_stream_lua_package_path(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
234234
}
235235

236236

237-
238-
239-
240-
241-
242-
243237
char *
244238
ngx_stream_lua_preread_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd,
245239
void *conf)
@@ -354,6 +348,7 @@ ngx_stream_lua_preread_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
354348
return NGX_CONF_OK;
355349
}
356350

351+
357352
char *
358353
ngx_stream_lua_content_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd,
359354
void *conf)
@@ -597,8 +592,6 @@ ngx_stream_lua_log_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
597592
}
598593

599594

600-
601-
602595
char *
603596
ngx_stream_lua_init_by_lua_block(ngx_conf_t *cf, ngx_command_t *cmd,
604597
void *conf)
@@ -727,8 +720,6 @@ ngx_stream_lua_init_worker_by_lua(ngx_conf_t *cf, ngx_command_t *cmd,
727720
}
728721

729722

730-
731-
732723
static u_char *
733724
ngx_stream_lua_gen_chunk_name(ngx_conf_t *cf, const char *tag, size_t tag_len,
734725
size_t *chunkname_len)
@@ -870,13 +861,15 @@ ngx_stream_lua_conf_lua_block_parse(ngx_conf_t *cf, ngx_command_t *cmd)
870861
if (dst == NULL) {
871862
return NGX_CONF_ERROR;
872863
}
864+
873865
dst->len = len;
874866
dst->len--; /* skip the trailing '}' block terminator */
875867

876868
p = ngx_palloc(cf->pool, len);
877869
if (p == NULL) {
878870
return NGX_CONF_ERROR;
879871
}
872+
880873
dst->data = p;
881874

882875
for (i = 0; i < cf->args->nelts; i++) {

src/ngx_stream_lua_initworkerby.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ ngx_stream_lua_init_worker(ngx_cycle_t *cycle)
158158
if (part->next == NULL) {
159159
break;
160160
}
161+
161162
part = part->next;
162163
ofile = part->elts;
163164
i = 0;

0 commit comments

Comments
 (0)