Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cb6ea13

Browse files
committed
style: fixed coding style issues found by ngx-releng.
1 parent dfdd61c commit cb6ea13

9 files changed

+124
-105
lines changed

‎src/ngx_http_drizzle_handler.c‎

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ ngx_http_drizzle_handler(ngx_http_request_t *r)
119119
if (dlcf->complex_target) {
120120
/* variables used in the drizzle_pass directive */
121121
if (ngx_http_complex_value(r, dlcf->complex_target, &target)
122-
!= NGX_OK)
122+
!= NGX_OK)
123123
{
124124
dd("failed to compile");
125125
return NGX_ERROR;
126126
}
127127

128128
if (target.len == 0) {
129129
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
130-
"drizzle: handler: empty \"drizzle_pass\" target");
130+
"drizzle: handler: empty \"drizzle_pass\" target");
131131
return NGX_HTTP_INTERNAL_SERVER_ERROR;
132132
}
133133

@@ -139,7 +139,7 @@ ngx_http_drizzle_handler(ngx_http_request_t *r)
139139

140140
if (dlcf->upstream.upstream == NULL) {
141141
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
142-
"drizzle: upstream \"%V\" not found", &target);
142+
"drizzle: upstream \"%V\" not found", &target);
143143

144144
return NGX_HTTP_INTERNAL_SERVER_ERROR;
145145
}
@@ -229,8 +229,7 @@ ngx_http_drizzle_wev_handler(ngx_http_request_t *r, ngx_http_upstream_t *u)
229229

230230
ngx_http_drizzle_set_thread_id_variable(r, u);
231231

232-
ngx_http_upstream_drizzle_next(r, u,
233-
NGX_HTTP_UPSTREAM_FT_TIMEOUT);
232+
ngx_http_upstream_drizzle_next(r, u, NGX_HTTP_UPSTREAM_FT_TIMEOUT);
234233
return;
235234
}
236235

@@ -264,8 +263,7 @@ ngx_http_drizzle_rev_handler(ngx_http_request_t *r, ngx_http_upstream_t *u)
264263
dd("drizzle connection read timeout");
265264
ngx_http_drizzle_set_thread_id_variable(r, u);
266265

267-
ngx_http_upstream_drizzle_next(r, u,
268-
NGX_HTTP_UPSTREAM_FT_TIMEOUT);
266+
ngx_http_upstream_drizzle_next(r, u, NGX_HTTP_UPSTREAM_FT_TIMEOUT);
269267
return;
270268
}
271269

@@ -323,8 +321,8 @@ static ngx_int_t
323321
ngx_http_drizzle_process_header(ngx_http_request_t *r)
324322
{
325323
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
326-
"ngx_http_drizzle_process_header should not be called"
327-
" by the upstream");
324+
"ngx_http_drizzle_process_header should not be called"
325+
" by the upstream");
328326

329327
return NGX_ERROR;
330328
}
@@ -336,8 +334,8 @@ ngx_http_drizzle_input_filter_init(void *data)
336334
ngx_http_request_t *r = data;
337335

338336
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
339-
"ngx_http_drizzle_input_filter_init should not be called"
340-
" by the upstream");
337+
"ngx_http_drizzle_input_filter_init should not be called"
338+
" by the upstream");
341339

342340
return NGX_ERROR;
343341
}
@@ -349,8 +347,8 @@ ngx_http_drizzle_input_filter(void *data, ssize_t bytes)
349347
ngx_http_request_t *r = data;
350348

351349
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
352-
"ngx_http_drizzle_input_filter should not be called"
353-
" by the upstream");
350+
"ngx_http_drizzle_input_filter should not be called"
351+
" by the upstream");
354352

355353
return NGX_ERROR;
356354
}
@@ -493,7 +491,7 @@ ngx_http_drizzle_status_handler(ngx_http_request_t *r)
493491
q = ngx_queue_next(q))
494492
{
495493
item = ngx_queue_data(q, ngx_http_drizzle_keepalive_cache_t,
496-
queue);
494+
queue);
497495

498496
len += sizeof(" ") - 1
499497
+ ngx_http_drizzle_get_num_size(item->used);
@@ -509,7 +507,7 @@ ngx_http_drizzle_status_handler(ngx_http_request_t *r)
509507
q = ngx_queue_next(q))
510508
{
511509
item = ngx_queue_data(q, ngx_http_drizzle_keepalive_cache_t,
512-
queue);
510+
queue);
513511

514512
len += sizeof(" ") - 1
515513
+ ngx_http_drizzle_get_num_size(item->used);
@@ -565,23 +563,23 @@ ngx_http_drizzle_status_handler(ngx_http_request_t *r)
565563
*b->last++ = '\n';
566564

567565
b->last = ngx_sprintf(b->last, " active connections: %uD\n",
568-
dscf->active_conns);
566+
dscf->active_conns);
569567

570568
b->last = ngx_sprintf(b->last, " connection pool capacity: %uD\n",
571-
dscf->max_cached);
569+
dscf->max_cached);
572570

573571
if (dscf->max_cached) {
574572
/* dump overflow flag for the connection pool */
575573

576574
switch (dscf->overflow) {
577575
case drizzle_keepalive_overflow_ignore:
578576
b->last = ngx_copy_const_str(b->last,
579-
" overflow: ignore\n");
577+
" overflow: ignore\n");
580578
break;
581579

582580
case drizzle_keepalive_overflow_reject:
583581
b->last = ngx_copy_const_str(b->last,
584-
" overflow: reject\n");
582+
" overflow: reject\n");
585583
break;
586584

587585
default:
@@ -592,23 +590,23 @@ ngx_http_drizzle_status_handler(ngx_http_request_t *r)
592590
/* dump the lengths of the "cache" and "free" queues in the pool */
593591

594592
b->last = ngx_sprintf(b->last, " cached connection queue: %uD\n",
595-
ngx_http_drizzle_queue_size(&dscf->cache));
593+
ngx_http_drizzle_queue_size(&dscf->cache));
596594

597595
b->last = ngx_sprintf(b->last, " free'd connection queue: %uD\n",
598-
ngx_http_drizzle_queue_size(&dscf->free));
596+
ngx_http_drizzle_queue_size(&dscf->free));
599597

600598
/* dump how many times that each individual connection in the
601599
* pool has been successfully used in the "cache" queue */
602600

603-
b->last = ngx_copy_const_str(b->last,
604-
" cached connection successfully used count:");
601+
b->last = ngx_copy_const_str(b->last," cached connection "
602+
"successfully used count:");
605603

606604
for (q = ngx_queue_head(&dscf->cache);
607605
q != ngx_queue_sentinel(&dscf->cache);
608606
q = ngx_queue_next(q))
609607
{
610608
item = ngx_queue_data(q, ngx_http_drizzle_keepalive_cache_t,
611-
queue);
609+
queue);
612610
b->last = ngx_sprintf(b->last, " %uD", item->used);
613611
}
614612

@@ -617,23 +615,23 @@ ngx_http_drizzle_status_handler(ngx_http_request_t *r)
617615
/* dump how many times that each individual connection in the
618616
* pool has been successfully used in the "free" queue */
619617

620-
b->last = ngx_copy_const_str(b->last,
621-
" free'd connection successfully used count:");
618+
b->last = ngx_copy_const_str(b->last," free'd connection "
619+
"successfully used count:");
622620

623621
for (q = ngx_queue_head(&dscf->free);
624622
q != ngx_queue_sentinel(&dscf->free);
625623
q = ngx_queue_next(q))
626624
{
627625
item = ngx_queue_data(q, ngx_http_drizzle_keepalive_cache_t,
628-
queue);
626+
queue);
629627
b->last = ngx_sprintf(b->last, " %uD", item->used);
630628
}
631629

632630
*b->last++ = '\n';
633631
}
634632

635633
b->last = ngx_sprintf(b->last, " servers: %uD\n",
636-
dscf->servers->nelts);
634+
dscf->servers->nelts);
637635

638636
b->last = ngx_sprintf(b->last, " peers: %uD\n", dscf->peers->number);
639637
}

‎src/ngx_http_drizzle_keepalive.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ ngx_http_drizzle_keepalive_free_peer(ngx_peer_connection_t *pc,
305305
queue);
306306

307307
ngx_http_upstream_drizzle_free_connection(pc->log, item->connection,
308-
item->drizzle_con, dscf);
308+
item->drizzle_con, dscf);
309309

310310
} else {
311311
dd("caching idle connection to the pool");

‎src/ngx_http_drizzle_module.c‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -181,23 +181,23 @@ ngx_module_t ngx_http_drizzle_module = {
181181

182182

183183
ngx_drizzle_http_method_t ngx_drizzle_http_methods[] = {
184-
{ (u_char *) "GET", (uint32_t) NGX_HTTP_GET },
185-
{ (u_char *) "HEAD", (uint32_t) NGX_HTTP_HEAD },
186-
{ (u_char *) "POST", (uint32_t) NGX_HTTP_POST },
187-
{ (u_char *) "PUT", (uint32_t) NGX_HTTP_PUT },
188-
{ (u_char *) "DELETE", (uint32_t) NGX_HTTP_DELETE },
189-
{ (u_char *) "MKCOL", (uint32_t) NGX_HTTP_MKCOL },
190-
{ (u_char *) "COPY", (uint32_t) NGX_HTTP_COPY },
191-
{ (u_char *) "MOVE", (uint32_t) NGX_HTTP_MOVE },
192-
{ (u_char *) "OPTIONS", (uint32_t) NGX_HTTP_OPTIONS },
193-
{ (u_char *) "PROPFIND" , (uint32_t) NGX_HTTP_PROPFIND },
194-
{ (u_char *) "PROPPATCH", (uint32_t) NGX_HTTP_PROPPATCH },
195-
{ (u_char *) "LOCK", (uint32_t) NGX_HTTP_LOCK },
196-
{ (u_char *) "UNLOCK", (uint32_t) NGX_HTTP_UNLOCK },
184+
{ (u_char *) "GET", (uint32_t) NGX_HTTP_GET },
185+
{ (u_char *) "HEAD", (uint32_t) NGX_HTTP_HEAD },
186+
{ (u_char *) "POST", (uint32_t) NGX_HTTP_POST },
187+
{ (u_char *) "PUT", (uint32_t) NGX_HTTP_PUT },
188+
{ (u_char *) "DELETE", (uint32_t) NGX_HTTP_DELETE },
189+
{ (u_char *) "MKCOL", (uint32_t) NGX_HTTP_MKCOL },
190+
{ (u_char *) "COPY", (uint32_t) NGX_HTTP_COPY },
191+
{ (u_char *) "MOVE", (uint32_t) NGX_HTTP_MOVE },
192+
{ (u_char *) "OPTIONS", (uint32_t) NGX_HTTP_OPTIONS },
193+
{ (u_char *) "PROPFIND" , (uint32_t) NGX_HTTP_PROPFIND },
194+
{ (u_char *) "PROPPATCH", (uint32_t) NGX_HTTP_PROPPATCH },
195+
{ (u_char *) "LOCK", (uint32_t) NGX_HTTP_LOCK },
196+
{ (u_char *) "UNLOCK", (uint32_t) NGX_HTTP_UNLOCK },
197197
#if defined(nginx_version) && (nginx_version >= 8041)
198-
{ (u_char *) "PATCH", (uint32_t) NGX_HTTP_PATCH },
198+
{ (u_char *) "PATCH", (uint32_t) NGX_HTTP_PATCH },
199199
#endif
200-
{ NULL, 0 }
200+
{ NULL, 0 }
201201
};
202202

203203

‎src/ngx_http_drizzle_module.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333

3434
#ifndef NGX_HTTP_GONE
35-
#define NGX_HTTP_GONE 410
35+
#define NGX_HTTP_GONE 410
3636
#endif
3737

38-
#define ngx_http_drizzle_module_version 1009
39-
#define ngx_http_drizzle_module_version_string \
40-
"0.1.7"
38+
#define ngx_http_drizzle_module_version 1009
39+
#define ngx_http_drizzle_module_version_string "0.1.7"
40+
4141

4242
extern ngx_module_t ngx_http_drizzle_module;
4343

‎src/ngx_http_drizzle_output.c‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,10 @@ ngx_http_drizzle_output_col(ngx_http_request_t *r, drizzle_column_st *col)
332332

333333
#if 0
334334
dd("std col type for %s: %d, %d (%d, %d, %d)",
335-
col_name, std_col_type, rds_col_type_blob,
336-
rds_rough_col_type_str,
337-
rds_rough_col_type_str << 14,
338-
(uint16_t) (19 | (rds_rough_col_type_str << 14))
339-
);
335+
col_name, std_col_type, rds_col_type_blob,
336+
rds_rough_col_type_str,
337+
rds_rough_col_type_str << 14,
338+
(uint16_t) (19 | (rds_rough_col_type_str << 14)));
340339
#endif
341340

342341
*(uint16_t *) last = std_col_type;
@@ -598,8 +597,7 @@ ngx_http_drizzle_get_buf(ngx_http_request_t *r,
598597

599598
} else {
600599
dd("MEM creating temp buf with size: %d", (int) conf->buf_size);
601-
dp->out_buf = ngx_create_temp_buf(r->pool,
602-
conf->buf_size);
600+
dp->out_buf = ngx_create_temp_buf(r->pool, conf->buf_size);
603601

604602
if (dp->out_buf == NULL) {
605603
return NGX_ERROR;
@@ -724,8 +722,8 @@ ngx_http_drizzle_submit_mem(ngx_http_request_t *r,
724722
len = dp->avail_out;
725723
}
726724

727-
dp->out_buf->last = ngx_copy(dp->out_buf->last,
728-
dp->postponed.pos, len);
725+
dp->out_buf->last = ngx_copy(dp->out_buf->last,dp->postponed.pos,
726+
len);
729727

730728
dp->avail_out -= len;
731729

‎src/ngx_http_drizzle_processor.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ ngx_http_upstream_drizzle_connect(ngx_http_request_t *r,
159159
}
160160

161161
if (ret != DRIZZLE_RETURN_OK) {
162-
ngx_log_error(NGX_LOG_ERR, c->log, 0, "failed to connect: %d: %s",
163-
(int) ret, drizzle_error(dc->drizzle));
162+
ngx_log_error(NGX_LOG_ERR, c->log, 0, "failed to connect: %d: %s",
163+
(int) ret, drizzle_error(dc->drizzle));
164164

165-
return NGX_ERROR;
165+
return NGX_ERROR;
166166
}
167167

168168
/* ret == DRIZZLE_RETURN_OK */

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /