Skip to content

Commit c9c5f94

Browse files
committed
Merge branch 'master' of github.com:chaoslawful/lua-nginx-module
2 parents b4c2a37 + 1dc6c21 commit c9c5f94

10 files changed

+19
-18
lines changed

src/ngx_http_lua_accessby.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ngx_http_lua_access_handler(ngx_http_request_t *r)
2828

2929
lmcf = ngx_http_get_module_main_conf(r, ngx_http_lua_module);
3030

31-
if (! lmcf->postponed_to_access_phase_end) {
31+
if (!lmcf->postponed_to_access_phase_end) {
3232
ngx_http_core_main_conf_t *cmcf;
3333
ngx_http_phase_handler_t tmp;
3434
ngx_http_phase_handler_t *ph;

src/ngx_http_lua_args.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ ngx_http_lua_parse_args(ngx_http_request_t *r, lua_State *L, u_char *buf,
312312

313313
lua_pushlstring(L, (char *) q, dst - q);
314314

315-
if (! parsing_value) {
315+
if (!parsing_value) {
316316
dd("pushing boolean true...");
317317
lua_pushboolean(L, 1);
318318
}

src/ngx_http_lua_cache.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ngx_http_lua_cache_load_code(lua_State *L, const char *key)
3636

3737
dd("Code cache table to load: %p", lua_topointer(L, -1));
3838

39-
if (! lua_istable(L, -1)) {
39+
if (!lua_istable(L, -1)) {
4040
dd("Error: code cache table to load did not exist!!");
4141
return NGX_ERROR;
4242
}
@@ -89,7 +89,7 @@ ngx_http_lua_cache_store_code(lua_State *L, const char *key)
8989

9090
dd("Code cache table to store: %p", lua_topointer(L, -1));
9191

92-
if (! lua_istable(L, -1)) {
92+
if (!lua_istable(L, -1)) {
9393
dd("Error: code cache table to load did not exist!!");
9494
return NGX_ERROR;
9595
}
@@ -120,7 +120,7 @@ ngx_http_lua_cache_loadbuffer(lua_State *L, const u_char *src, size_t src_len,
120120

121121
dd("XXX cache key: [%s]", cache_key);
122122

123-
if (! enabled) {
123+
if (!enabled) {
124124
ngx_http_lua_clear_package_loaded(L);
125125
}
126126

src/ngx_http_lua_directive.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ ngx_http_lua_code_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
114114

115115
fp = (ngx_flag_t *) (p + cmd->offset);
116116

117-
if (! *fp) {
117+
if (!*fp) {
118118
ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
119119
"lua_code_cache is off; this will hurt performance");
120120
}
@@ -383,7 +383,7 @@ ngx_http_lua_rewrite_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
383383

384384
llcf->rewrite_handler = cmd->post;
385385

386-
if (! ngx_http_lua_requires_rewrite) {
386+
if (!ngx_http_lua_requires_rewrite) {
387387
ngx_http_lua_requires_rewrite = 1;
388388
ngx_http_lua_requires_capture_filter = 1;
389389
}
@@ -464,7 +464,7 @@ ngx_http_lua_access_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
464464

465465
llcf->access_handler = cmd->post;
466466

467-
if (! ngx_http_lua_requires_access) {
467+
if (!ngx_http_lua_requires_access) {
468468
ngx_http_lua_requires_access = 1;
469469
ngx_http_lua_requires_capture_filter = 1;
470470
}

src/ngx_http_lua_headers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ ngx_http_lua_ngx_header_set(lua_State *L)
185185

186186
key.len = len;
187187

188-
if (! ctx->headers_set) {
188+
if (!ctx->headers_set) {
189189
rc = ngx_http_set_content_type(r);
190190
if (rc != NGX_OK) {
191191
return luaL_error(L,

src/ngx_http_lua_rewriteby.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ngx_http_lua_rewrite_handler(ngx_http_request_t *r)
3434

3535
lmcf = ngx_http_get_module_main_conf(r, ngx_http_lua_module);
3636

37-
if (! lmcf->postponed_to_rewrite_phase_end) {
37+
if (!lmcf->postponed_to_rewrite_phase_end) {
3838
ngx_http_core_main_conf_t *cmcf;
3939
ngx_http_phase_handler_t tmp;
4040
ngx_http_phase_handler_t *ph;

src/ngx_http_lua_script.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ ngx_http_lua_script_compile(ngx_http_lua_script_compile_t *sc)
257257
goto invalid_variable;
258258
}
259259

260-
if (! num_var) {
260+
if (!num_var) {
261261
ngx_log_error(NGX_LOG_ERR, sc->log, 0,
262262
"attempt to use named capturing variable "
263263
"\"%V\" (named captures not supported yet)", &name);

src/ngx_http_lua_subrequest.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,8 @@ ngx_http_lua_handle_subreq_responses(ngx_http_request_t *r,
11271127
lua_rawset(cc, -3); /* stack: table */
11281128

11291129
} else {
1130-
if (! lua_istable(cc, -1)) { /* already inserted one value */
1130+
1131+
if (!lua_istable(cc, -1)) { /* already inserted one value */
11311132
lua_createtable(cc, 4, 0);
11321133
/* stack: table key value table */
11331134

src/ngx_http_lua_util.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ngx_http_lua_new_state(ngx_conf_t *cf, ngx_http_lua_main_conf_t *lmcf)
9898

9999
lua_getglobal(L, "package");
100100

101-
if (! lua_istable(L, -1)) {
101+
if (!lua_istable(L, -1)) {
102102
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
103103
"the \"package\" table does not exist");
104104
return NULL;
@@ -319,16 +319,16 @@ ngx_http_lua_send_header_if_needed(ngx_http_request_t *r,
319319
{
320320
ngx_int_t rc;
321321

322-
if ( ! ctx->headers_sent ) {
322+
if (!ctx->headers_sent ) {
323323
if (r->headers_out.status == 0) {
324324
r->headers_out.status = NGX_HTTP_OK;
325325
}
326326

327-
if (! ctx->headers_set && ngx_http_set_content_type(r) != NGX_OK) {
327+
if (!ctx->headers_set && ngx_http_set_content_type(r) != NGX_OK) {
328328
return NGX_HTTP_INTERNAL_SERVER_ERROR;
329329
}
330330

331-
if (! ctx->headers_set) {
331+
if (!ctx->headers_set) {
332332
ngx_http_clear_content_length(r);
333333
ngx_http_clear_accept_ranges(r);
334334
}
@@ -1288,7 +1288,7 @@ ngx_http_lua_set_multi_value_table(lua_State *L, int index)
12881288
lua_rawset(L, index); /* stack: table */
12891289

12901290
} else {
1291-
if (! lua_istable(L, -1)) {
1291+
if (!lua_istable(L, -1)) {
12921292
/* just inserted one value */
12931293
lua_createtable(L, 4, 0);
12941294
/* stack: table key value value table */

src/ngx_http_lua_variable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ ngx_http_lua_var_set(lua_State *L)
205205
v = ngx_hash_find(&cmcf->variables_hash, hash, name.data, name.len);
206206

207207
if (v) {
208-
if (! (v->flags & NGX_HTTP_VAR_CHANGEABLE)) {
208+
if (!(v->flags & NGX_HTTP_VAR_CHANGEABLE)) {
209209
return luaL_error(L, "variable \"%s\" not changeable", lowcase);
210210
}
211211

0 commit comments

Comments
 (0)