Welcome! Log In Create A New Profile

Advanced

[PATCH 1 of 5] Style: add whitespace between control statement and parentheses

Piotr Sikora
July 08, 2014 06:08AM
# HG changeset patch
# User Piotr Sikora <piotr@cloudflare.com>
# Date 1404813793 25200
# Tue Jul 08 03:03:13 2014 -0700
# Node ID e00ca08c44e1e410e9a0ff3492b9419a2f32d80a
# Parent a680bf4dddd5c4b106419e3dfb0264815c401275
Style: add whitespace between control statement and parentheses.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>

diff -r a680bf4dddd5 -r e00ca08c44e1 src/http/modules/ngx_http_geo_module.c
--- a/src/http/modules/ngx_http_geo_module.c Sat Jul 05 23:29:47 2014 +0400
+++ b/src/http/modules/ngx_http_geo_module.c Tue Jul 08 03:03:13 2014 -0700
@@ -1470,7 +1470,7 @@ ngx_http_geo_include_binary_base(ngx_con

vv = (ngx_http_variable_value_t *) (base + sizeof(ngx_http_geo_header_t));

- while(vv->data) {
+ while (vv->data) {
len = ngx_align(sizeof(ngx_http_variable_value_t) + vv->len,
sizeof(void *));
ngx_crc32_update(&crc32, (u_char *) vv, len);
diff -r a680bf4dddd5 -r e00ca08c44e1 src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c Sat Jul 05 23:29:47 2014 +0400
+++ b/src/http/ngx_http_core_module.c Tue Jul 08 03:03:13 2014 -0700
@@ -2355,7 +2355,7 @@ ngx_http_gzip_accept_encoding(ngx_str_t
p += 4;

while (p < last) {
- switch(*p++) {
+ switch (*p++) {
case ',':
return NGX_OK;
case ';':
@@ -2372,7 +2372,7 @@ ngx_http_gzip_accept_encoding(ngx_str_t
quantity:

while (p < last) {
- switch(*p++) {
+ switch (*p++) {
case 'q':
case 'Q':
goto equal;
diff -r a680bf4dddd5 -r e00ca08c44e1 src/http/ngx_http_parse.c
--- a/src/http/ngx_http_parse.c Sat Jul 05 23:29:47 2014 +0400
+++ b/src/http/ngx_http_parse.c Tue Jul 08 03:03:13 2014 -0700
@@ -1287,7 +1287,7 @@ ngx_http_parse_complex_uri(ngx_http_requ
break;
}

- switch(ch) {
+ switch (ch) {
#if (NGX_WIN32)
case '\\':
if (u - 2 >= r->uri.data
@@ -1357,7 +1357,7 @@ ngx_http_parse_complex_uri(ngx_http_requ
break;
}

- switch(ch) {
+ switch (ch) {
#if (NGX_WIN32)
case '\\':
break;
@@ -1400,7 +1400,7 @@ ngx_http_parse_complex_uri(ngx_http_requ
break;
}

- switch(ch) {
+ switch (ch) {
#if (NGX_WIN32)
case '\\':
#endif
@@ -1441,7 +1441,7 @@ ngx_http_parse_complex_uri(ngx_http_requ
break;
}

- switch(ch) {
+ switch (ch) {
#if (NGX_WIN32)
case '\\':
#endif
diff -r a680bf4dddd5 -r e00ca08c44e1 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Sat Jul 05 23:29:47 2014 +0400
+++ b/src/http/ngx_http_upstream.c Tue Jul 08 03:03:13 2014 -0700
@@ -3441,7 +3441,7 @@ ngx_http_upstream_next(ngx_http_request_
u->peer.tries++;

} else {
- switch(ft_type) {
+ switch (ft_type) {

case NGX_HTTP_UPSTREAM_FT_TIMEOUT:
status = NGX_HTTP_GATEWAY_TIME_OUT;
diff -r a680bf4dddd5 -r e00ca08c44e1 src/os/win32/ngx_service.c
--- a/src/os/win32/ngx_service.c Sat Jul 05 23:29:47 2014 +0400
+++ b/src/os/win32/ngx_service.c Tue Jul 08 03:03:13 2014 -0700
@@ -89,7 +89,7 @@ u_int service_handler(u_int control, u_i
{
/* primary thread */

- switch(control) {
+ switch (control) {

case SERVICE_CONTROL_INTERROGATE:
status = NGX_IOCP_INTERROGATE;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 1 of 5] Style: add whitespace between control statement and parentheses

Piotr Sikora 600 July 08, 2014 06:08AM

[PATCH 4 of 5] Style: use ngx_memcpy() instead of memcpy()

Piotr Sikora 316 July 08, 2014 06:08AM

[PATCH 3 of 5] Style: keep return type and function name on different lines

Piotr Sikora 244 July 08, 2014 06:08AM

[PATCH 5 of 5] Style: fix typo

Piotr Sikora 261 July 08, 2014 06:08AM

Re: [PATCH 5 of 5] Style: fix typo

Maxim Dounin 318 July 08, 2014 09:58PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 227
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready