style fix

This commit is contained in:
Igor Sysoev 2010-06-23 16:34:54 +00:00
parent 0923d08148
commit aa6936e61a
13 changed files with 22 additions and 21 deletions

View File

@ -671,7 +671,8 @@ ngx_conf_read_token(ngx_conf_t *cf)
}
} else if (ch == ' ' || ch == '\t' || ch == CR || ch == LF
|| ch == ';' || ch == '{') {
|| ch == ';' || ch == '{')
{
last_space = 1;
found = 1;
}

View File

@ -1836,7 +1836,7 @@ ngx_resolver_create_addr_query(ngx_resolver_node_t *rn, ngx_resolver_ctx_t *ctx)
p += sizeof(ngx_resolver_query_t);
for (n = 0; n < 32; n += 8){
for (n = 0; n < 32; n += 8) {
d = ngx_sprintf(&p[1], "%ud", (ctx->addr >> n) & 0xff);
*p = (u_char) (d - &p[1]);
p = d;

View File

@ -346,7 +346,7 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
len = a->nelts * sizeof(ngx_http_geo_range_t);
ctx.high->low[i].ranges = ngx_palloc(cf->pool, len);
if (ctx.high->low[i].ranges == NULL ){
if (ctx.high->low[i].ranges == NULL) {
return NGX_CONF_ERROR;
}
@ -447,7 +447,7 @@ ngx_http_geo(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
goto failed;
}
if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK){
if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) {
goto failed;
}

View File

@ -374,7 +374,7 @@ ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
if (ngx_strcmp(value[0].data, "include") == 0) {
file = value[1];
if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK){
if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) {
return NGX_CONF_ERROR;
}

View File

@ -431,7 +431,7 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
while (ctx->in || ctx->buf) {
if (ctx->buf == NULL ){
if (ctx->buf == NULL) {
ctx->buf = ctx->in->buf;
ctx->in = ctx->in->next;
ctx->pos = ctx->buf->pos;

View File

@ -210,7 +210,7 @@ ngx_http_sub_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
while (ctx->in || ctx->buf) {
if (ctx->buf == NULL ){
if (ctx->buf == NULL) {
ctx->buf = ctx->in->buf;
ctx->in = ctx->in->next;
ctx->pos = ctx->buf->pos;

View File

@ -268,7 +268,7 @@ ngx_http_xslt_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
if (ngx_http_xslt_add_chunk(r, ctx, cl->buf) != NGX_OK) {
if (ctx->ctxt->myDoc){
if (ctx->ctxt->myDoc) {
#if (NGX_HTTP_XSLT_REUSE_DTD)
ctx->ctxt->myDoc->extSubset = NULL;

View File

@ -272,7 +272,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
/* space* before URI */
case sw_spaces_before_uri:
if (ch == '/' ){
if (ch == '/') {
r->uri_start = p;
state = sw_after_slash_in_uri;
break;

View File

@ -346,7 +346,7 @@ ngx_mail_auth_plain(ngx_mail_session_t *s, ngx_connection_t *c, ngx_uint_t n)
#endif
plain.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[n].len));
if (plain.data == NULL){
if (plain.data == NULL) {
return NGX_ERROR;
}
@ -403,7 +403,7 @@ ngx_mail_auth_login_username(ngx_mail_session_t *s, ngx_connection_t *c,
"mail auth login username: \"%V\"", &arg[n]);
s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[n].len));
if (s->login.data == NULL){
if (s->login.data == NULL) {
return NGX_ERROR;
}
@ -434,7 +434,7 @@ ngx_mail_auth_login_password(ngx_mail_session_t *s, ngx_connection_t *c)
s->passwd.data = ngx_pnalloc(c->pool,
ngx_base64_decoded_length(arg[0].len));
if (s->passwd.data == NULL){
if (s->passwd.data == NULL) {
return NGX_ERROR;
}
@ -494,7 +494,7 @@ ngx_mail_auth_cram_md5(ngx_mail_session_t *s, ngx_connection_t *c)
"mail auth cram-md5: \"%V\"", &arg[0]);
s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length(arg[0].len));
if (s->login.data == NULL){
if (s->login.data == NULL) {
return NGX_ERROR;
}

View File

@ -158,7 +158,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain)
rev->ready = 0;
if (n == NGX_ERROR){
if (n == NGX_ERROR) {
c->read->error = 1;
}
@ -247,7 +247,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain)
rev->ready = 0;
if (n == NGX_ERROR){
if (n == NGX_ERROR) {
c->read->error = 1;
}

View File

@ -113,7 +113,7 @@ ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
rev->ready = 0;
if (n == NGX_ERROR){
if (n == NGX_ERROR) {
rev->error = 1;
}
@ -169,7 +169,7 @@ ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
rev->ready = 0;
if (n == NGX_ERROR){
if (n == NGX_ERROR) {
rev->error = 1;
}

View File

@ -60,7 +60,7 @@ ngx_udp_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
rev->ready = 0;
if (n == NGX_ERROR){
if (n == NGX_ERROR) {
rev->error = 1;
}
@ -104,7 +104,7 @@ ngx_udp_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
rev->ready = 0;
if (n == NGX_ERROR){
if (n == NGX_ERROR) {
rev->error = 1;
}

View File

@ -43,7 +43,7 @@ ngx_wsarecv(ngx_connection_t *c, u_char *buf, size_t size)
n = ngx_connection_error(c, err, "WSARecv() failed");
if (n == NGX_ERROR){
if (n == NGX_ERROR) {
rev->error = 1;
}
@ -140,7 +140,7 @@ ngx_overlapped_wsarecv(ngx_connection_t *c, u_char *buf, size_t size)
n = ngx_connection_error(c, err, "WSARecv() failed");
if (n == NGX_ERROR){
if (n == NGX_ERROR) {
rev->error = 1;
}