Skip to content

Commit 962b08e

Browse files
committed
various coding style fixes caught by ngx-releng.
1 parent e5f3de6 commit 962b08e

File tree

6 files changed

+27
-26
lines changed

6 files changed

+27
-26
lines changed

‎src/ngx_http_srcache_fetch.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ ngx_http_srcache_fetch_subrequest(ngx_http_request_t *r,
377377
}
378378

379379
if (ngx_http_complex_value(r, &conf->fetch->args, &parsed_sr->args)
380-
!=NGX_OK)
380+
!=NGX_OK)
381381
{
382382
returnNGX_ERROR;
383383
}
@@ -416,7 +416,7 @@ ngx_http_srcache_fetch_subrequest(ngx_http_request_t *r,
416416
parsed_sr->location.data);
417417

418418
dd("fetch args: %.*s", (int) parsed_sr->args.len,
419-
parsed_sr->args.data);
419+
parsed_sr->args.data);
420420

421421
rc=ngx_http_subrequest(r, &parsed_sr->location, &parsed_sr->args,
422422
&sr, psr, flags);

‎src/ngx_http_srcache_filter_module.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ static ngx_str_t ngx_http_srcache_hide_headers[] ={
4848

4949

5050
staticngx_conf_bitmask_tngx_http_srcache_cache_method_mask[] ={
51-
{ngx_string("GET"), NGX_HTTP_GET},
52-
{ngx_string("HEAD"), NGX_HTTP_HEAD },
53-
{ngx_string("POST"), NGX_HTTP_POST },
54-
{ngx_string("PUT"), NGX_HTTP_PUT },
55-
{ngx_string("DELETE"), NGX_HTTP_DELETE },
56-
{ngx_null_string, 0 }
51+
{ngx_string("GET"), NGX_HTTP_GET},
52+
{ngx_string("HEAD"), NGX_HTTP_HEAD },
53+
{ngx_string("POST"), NGX_HTTP_POST },
54+
{ngx_string("PUT"), NGX_HTTP_PUT },
55+
{ngx_string("DELETE"), NGX_HTTP_DELETE },
56+
{ngx_null_string, 0 }
5757
};
5858

5959

@@ -303,12 +303,12 @@ ngx_http_srcache_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
303303
ngx_conf_merge_ptr_value(conf->store, prev->store, NULL);
304304

305305
ngx_conf_merge_size_value(conf->buf_size, prev->buf_size,
306-
(size_t) ngx_pagesize);
306+
(size_t) ngx_pagesize);
307307

308308
ngx_conf_merge_size_value(conf->store_max_size, prev->store_max_size, 0);
309309

310310
ngx_conf_merge_size_value(conf->header_buf_size, prev->header_buf_size,
311-
(size_t) ngx_pagesize);
311+
(size_t) ngx_pagesize);
312312

313313
if (conf->fetch_skip==NULL){
314314
conf->fetch_skip=prev->fetch_skip;
@@ -340,7 +340,7 @@ ngx_http_srcache_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
340340
ngx_conf_merge_value(conf->default_expire, prev->default_expire, 60);
341341

342342
ngx_conf_merge_value(conf->ignore_content_encoding,
343-
prev->ignore_content_encoding, 0);
343+
prev->ignore_content_encoding, 0);
344344

345345
hash.max_size=512;
346346
hash.bucket_size=ngx_align(64, ngx_cacheline_size);
@@ -396,8 +396,8 @@ ngx_http_srcache_conf_set_request(ngx_conf_t *cf, ngx_command_t *cmd,
396396

397397
if (rp->method==NGX_HTTP_UNKNOWN){
398398
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
399-
"%V specifies bad HTTP method %V",
400-
&cmd->name, method_name);
399+
"%V specifies bad HTTP method %V",
400+
&cmd->name, method_name);
401401

402402
returnNGX_CONF_ERROR;
403403
}
@@ -589,16 +589,16 @@ ngx_http_srcache_store_statuses(ngx_conf_t *cf, ngx_command_t *cmd,
589589
status=ngx_atoi(value[i].data, value[i].len);
590590
if (status==NGX_ERROR){
591591
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
592-
"status code \"%V\" is an invalid number",
593-
&value[i]);
592+
"status code \"%V\" is an invalid number",
593+
&value[i]);
594594

595595
returnNGX_CONF_ERROR;
596596
}
597597

598598
if (status<0){
599599
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
600-
"status code \"%V\" is not a positive number",
601-
&value[i]);
600+
"status code \"%V\" is not a positive number",
601+
&value[i]);
602602

603603
returnNGX_CONF_ERROR;
604604
}
@@ -609,7 +609,7 @@ ngx_http_srcache_store_statuses(ngx_conf_t *cf, ngx_command_t *cmd,
609609
slcf->store_statuses[i-1] =0;
610610

611611
ngx_sort(slcf->store_statuses, n, sizeof(ngx_int_t),
612-
ngx_http_srcache_cmp_int);
612+
ngx_http_srcache_cmp_int);
613613

614614
#if0
615615
for (i=0; i<n; i++){

‎src/ngx_http_srcache_filter_module.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ typedef struct{
9494
} ngx_http_srcache_main_conf_t;
9595

9696

97-
typedefstructngx_http_srcache_ctx_sngx_http_srcache_ctx_t;
97+
typedefstructngx_http_srcache_ctx_sngx_http_srcache_ctx_t;
9898

9999
typedefstructngx_http_srcache_postponed_request_s
100100
ngx_http_srcache_postponed_request_t;
@@ -108,7 +108,7 @@ struct ngx_http_srcache_ctx_s{
108108
void*store_wev_handler_ctx;
109109

110110
ngx_int_t (*process_header)(ngx_http_request_t*r,
111-
ngx_buf_t*b);
111+
ngx_buf_t*b);
112112

113113
time_tvalid_sec;
114114

‎src/ngx_http_srcache_headers.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ ngx_http_srcache_process_last_modified(ngx_http_request_t *r,
246246
h->value.len);
247247

248248
dd("setting last-modified-time: %d",
249-
(int) r->headers_out.last_modified_time);
249+
(int) r->headers_out.last_modified_time);
250250

251251
returnNGX_OK;
252252
}

‎src/ngx_http_srcache_store.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ ngx_http_srcache_store_subrequest(ngx_http_request_t *r,
601601
dd("firing the store subrequest");
602602

603603
dd("store location: %.*s", (int) parsed_sr->location.len,
604-
parsed_sr->location.data);
604+
parsed_sr->location.data);
605605

606606
dd("store args: %.*s", (int) parsed_sr->args.len,
607607
parsed_sr->args.data);

‎src/ngx_http_srcache_util.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ ngx_http_srcache_discard_bufs(ngx_pool_t *pool, ngx_chain_t *in)
144144
ngx_int_t
145145
ngx_http_srcache_parse_method_name(ngx_str_t**method_name_ptr)
146146
{
147-
constngx_str_t*method_name=*method_name_ptr;
147+
constngx_str_t*method_name=*method_name_ptr;
148148

149149
switch (method_name->len){
150+
150151
case3:
151152
if (ngx_http_srcache_strcmp_const(method_name->data, "GET") ==0){
152153
*method_name_ptr=&ngx_http_srcache_get_method;
@@ -424,7 +425,7 @@ ngx_http_srcache_set_content_length_header(ngx_http_request_t *r, off_t len)
424425
'n'), 'g'), 't'), 'h');
425426

426427
dd("r content length: %.*s",
427-
(int)r->headers_in.content_length->value.len,
428+
(int)r->headers_in.content_length->value.len,
428429
r->headers_in.content_length->value.data);
429430

430431
pr=r->parent;
@@ -1069,7 +1070,7 @@ ngx_http_srcache_store_response_header(ngx_http_request_t *r,
10691070

10701071
dd("header hash: %lu, hash lc: %lu", (unsigned long) header[i].hash,
10711072
(unsigned long) ngx_hash_key_lc(header[i].key.data,
1072-
header[i].key.len));
1073+
header[i].key.len));
10731074

10741075
if (ngx_hash_find(&conf->hide_headers_hash, header[i].hash,
10751076
header[i].lowcase_key, header[i].key.len))
@@ -1212,7 +1213,7 @@ ngx_http_srcache_hide_headers_hash(ngx_conf_t *cf,
12121213
}
12131214

12141215
dd("adding header to hide headers: %.*s", (int) h[i].len,
1215-
h[i].data);
1216+
h[i].data);
12161217

12171218
exist:
12181219

0 commit comments

Comments
(0)