Mercurial > hg > nginx
changeset 3238:415400fa0f10 stable-0.7
merge r2920, r2934, r3116, r3119:
style fixes
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 26 Oct 2009 16:06:11 +0000 |
parents | 2efa8d2fcde1 |
children | 8254055b6693 |
files | src/core/ngx_hash.c src/core/ngx_string.c src/http/modules/ngx_http_geo_module.c src/http/modules/ngx_http_log_module.c src/http/modules/ngx_http_xslt_filter_module.c src/os/unix/ngx_files.h |
diffstat | 6 files changed, 24 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_hash.c Mon Oct 26 15:54:29 2009 +0000 +++ b/src/core/ngx_hash.c Mon Oct 26 16:06:11 2009 +0000 @@ -534,7 +534,7 @@ next_name->key.len = names[n].key.len - len; next_name->key.data = names[n].key.data + len; - next_name->key_hash= 0; + next_name->key_hash = 0; next_name->value = names[n].value; #if 0 @@ -562,7 +562,7 @@ next_name->key.len = names[i].key.len - dot_len; next_name->key.data = names[i].key.data + dot_len; - next_name->key_hash= 0; + next_name->key_hash = 0; next_name->value = names[i].value; #if 0
--- a/src/core/ngx_string.c Mon Oct 26 15:54:29 2009 +0000 +++ b/src/core/ngx_string.c Mon Oct 26 16:06:11 2009 +0000 @@ -30,12 +30,15 @@ return dst; } - for ( /* void */ ; --n; dst++, src++) { + while (--n) { *dst = *src; if (*dst == '\0') { return dst; } + + dst++; + src++; } *dst = '\0'; @@ -565,8 +568,8 @@ c1 = (ngx_uint_t) *s1++; c2 = (ngx_uint_t) *s2++; - c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1; - c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; + c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1; + c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; if (c1 == c2) { @@ -591,8 +594,8 @@ c1 = (ngx_uint_t) *s1++; c2 = (ngx_uint_t) *s2++; - c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1; - c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; + c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1; + c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; if (c1 == c2) { @@ -680,7 +683,7 @@ ngx_uint_t c1, c2; c2 = (ngx_uint_t) *s2++; - c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; + c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; do { do { @@ -690,7 +693,7 @@ return NULL; } - c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1; + c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1; } while (c1 != c2); @@ -712,7 +715,7 @@ ngx_uint_t c1, c2; c2 = (ngx_uint_t) *s2++; - c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; + c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2; last -= n; do { @@ -723,7 +726,7 @@ c1 = (ngx_uint_t) *s1++; - c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1; + c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1; } while (c1 != c2); @@ -1337,7 +1340,7 @@ /* find the number of the characters to be escaped */ - n = 0; + n = 0; for (i = 0; i < size; i++) { if (escape[*src >> 5] & (1 << (*src & 0x1f))) {
--- a/src/http/modules/ngx_http_geo_module.c Mon Oct 26 15:54:29 2009 +0000 +++ b/src/http/modules/ngx_http_geo_module.c Mon Oct 26 16:06:11 2009 +0000 @@ -864,7 +864,7 @@ /* rc == NGX_BUSY */ - old = (ngx_http_variable_value_t *) + old = (ngx_http_variable_value_t *) ngx_radix32tree_find(ctx->tree, cidr.u.in.addr & cidr.u.in.mask); ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
--- a/src/http/modules/ngx_http_log_module.c Mon Oct 26 15:54:29 2009 +0000 +++ b/src/http/modules/ngx_http_log_module.c Mon Oct 26 16:06:11 2009 +0000 @@ -676,7 +676,7 @@ /* find the number of the characters to be escaped */ - n = 0; + n = 0; for (i = 0; i < size; i++) { if (escape[*src >> 5] & (1 << (*src & 0x1f))) {
--- a/src/http/modules/ngx_http_xslt_filter_module.c Mon Oct 26 15:54:29 2009 +0000 +++ b/src/http/modules/ngx_http_xslt_filter_module.c Mon Oct 26 16:06:11 2009 +0000 @@ -404,7 +404,7 @@ sax->endElementNs = ngx_http_xslt_sax_end_element; sax->characters = ngx_http_xslt_sax_characters; - sax->ignorableWhitespace = ngx_http_xslt_sax_characters; + sax->ignorableWhitespace = ngx_http_xslt_sax_characters; sax->cdataBlock = ngx_http_xslt_sax_cdata_block; sax->getEntity = ngx_http_xslt_sax_get_entity; sax->resolveEntity = ngx_http_xslt_sax_resolve_entity;
--- a/src/os/unix/ngx_files.h Mon Oct 26 15:54:29 2009 +0000 +++ b/src/os/unix/ngx_files.h Mon Oct 26 16:06:11 2009 +0000 @@ -18,13 +18,13 @@ typedef struct { - DIR *dir; - struct dirent *de; - struct stat info; + DIR *dir; + struct dirent *de; + struct stat info; - unsigned type:8; - unsigned valid_info:1; - unsigned valid_type:1; + unsigned type:8; + unsigned valid_info:1; + unsigned valid_type:1; } ngx_dir_t;