This commit is contained in:
Ruslan Ermilov 2016-03-30 11:52:16 +03:00
parent dfbc51a8cc
commit 7ad57da598
43 changed files with 210 additions and 210 deletions

View File

@ -613,9 +613,9 @@ ngx_conf_read_token(ngx_conf_t *cf)
need_space = 0;
} else {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"unexpected \"%c\"", ch);
return NGX_ERROR;
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"unexpected \"%c\"", ch);
return NGX_ERROR;
}
}

View File

@ -47,21 +47,21 @@ ngx_create_listening(ngx_conf_t *cf, void *sockaddr, socklen_t socklen)
switch (ls->sockaddr->sa_family) {
#if (NGX_HAVE_INET6)
case AF_INET6:
ls->addr_text_max_len = NGX_INET6_ADDRSTRLEN;
break;
ls->addr_text_max_len = NGX_INET6_ADDRSTRLEN;
break;
#endif
#if (NGX_HAVE_UNIX_DOMAIN)
case AF_UNIX:
ls->addr_text_max_len = NGX_UNIX_ADDRSTRLEN;
len++;
break;
ls->addr_text_max_len = NGX_UNIX_ADDRSTRLEN;
len++;
break;
#endif
case AF_INET:
ls->addr_text_max_len = NGX_INET_ADDRSTRLEN;
break;
ls->addr_text_max_len = NGX_INET_ADDRSTRLEN;
break;
default:
ls->addr_text_max_len = NGX_SOCKADDR_STRLEN;
break;
ls->addr_text_max_len = NGX_SOCKADDR_STRLEN;
break;
}
ls->addr_text.data = ngx_pnalloc(cf->pool, len);
@ -168,22 +168,22 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle)
#if (NGX_HAVE_INET6)
case AF_INET6:
ls[i].addr_text_max_len = NGX_INET6_ADDRSTRLEN;
len = NGX_INET6_ADDRSTRLEN + sizeof("[]:65535") - 1;
break;
ls[i].addr_text_max_len = NGX_INET6_ADDRSTRLEN;
len = NGX_INET6_ADDRSTRLEN + sizeof("[]:65535") - 1;
break;
#endif
#if (NGX_HAVE_UNIX_DOMAIN)
case AF_UNIX:
ls[i].addr_text_max_len = NGX_UNIX_ADDRSTRLEN;
len = NGX_UNIX_ADDRSTRLEN;
break;
ls[i].addr_text_max_len = NGX_UNIX_ADDRSTRLEN;
len = NGX_UNIX_ADDRSTRLEN;
break;
#endif
case AF_INET:
ls[i].addr_text_max_len = NGX_INET_ADDRSTRLEN;
len = NGX_INET_ADDRSTRLEN + sizeof(":65535") - 1;
break;
ls[i].addr_text_max_len = NGX_INET_ADDRSTRLEN;
len = NGX_INET_ADDRSTRLEN + sizeof(":65535") - 1;
break;
default:
ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_socket_errno,

View File

@ -95,25 +95,25 @@ struct ngx_listening_s {
typedef enum {
NGX_ERROR_ALERT = 0,
NGX_ERROR_ERR,
NGX_ERROR_INFO,
NGX_ERROR_IGNORE_ECONNRESET,
NGX_ERROR_IGNORE_EINVAL
NGX_ERROR_ALERT = 0,
NGX_ERROR_ERR,
NGX_ERROR_INFO,
NGX_ERROR_IGNORE_ECONNRESET,
NGX_ERROR_IGNORE_EINVAL
} ngx_connection_log_error_e;
typedef enum {
NGX_TCP_NODELAY_UNSET = 0,
NGX_TCP_NODELAY_SET,
NGX_TCP_NODELAY_DISABLED
NGX_TCP_NODELAY_UNSET = 0,
NGX_TCP_NODELAY_SET,
NGX_TCP_NODELAY_DISABLED
} ngx_connection_tcp_nodelay_e;
typedef enum {
NGX_TCP_NOPUSH_UNSET = 0,
NGX_TCP_NOPUSH_SET,
NGX_TCP_NOPUSH_DISABLED
NGX_TCP_NOPUSH_UNSET = 0,
NGX_TCP_NOPUSH_SET,
NGX_TCP_NOPUSH_DISABLED
} ngx_connection_tcp_nopush_e;

View File

@ -165,8 +165,8 @@ ngx_crypt_to64(u_char *p, uint32_t v, size_t n)
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
while (n--) {
*p++ = itoa64[v & 0x3f];
v >>= 6;
*p++ = itoa64[v & 0x3f];
v >>= 6;
}
return p;

View File

@ -79,35 +79,35 @@ struct ngx_cycle_s {
typedef struct {
ngx_flag_t daemon;
ngx_flag_t master;
ngx_flag_t daemon;
ngx_flag_t master;
ngx_msec_t timer_resolution;
ngx_msec_t timer_resolution;
ngx_int_t worker_processes;
ngx_int_t debug_points;
ngx_int_t worker_processes;
ngx_int_t debug_points;
ngx_int_t rlimit_nofile;
off_t rlimit_core;
ngx_int_t rlimit_nofile;
off_t rlimit_core;
int priority;
int priority;
ngx_uint_t cpu_affinity_auto;
ngx_uint_t cpu_affinity_n;
ngx_cpuset_t *cpu_affinity;
ngx_uint_t cpu_affinity_auto;
ngx_uint_t cpu_affinity_n;
ngx_cpuset_t *cpu_affinity;
char *username;
ngx_uid_t user;
ngx_gid_t group;
char *username;
ngx_uid_t user;
ngx_gid_t group;
ngx_str_t working_directory;
ngx_str_t lock_file;
ngx_str_t working_directory;
ngx_str_t lock_file;
ngx_str_t pid;
ngx_str_t oldpid;
ngx_str_t pid;
ngx_str_t oldpid;
ngx_array_t env;
char **environment;
ngx_array_t env;
char **environment;
} ngx_core_conf_t;

View File

@ -155,7 +155,7 @@ ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, ngx_pool_t *pool,
#if 0
for (i = 0; i < file->name.len; i++) {
file->name.data[i] = 'X';
file->name.data[i] = 'X';
}
#endif

View File

@ -1242,19 +1242,19 @@ ngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,
#if (NGX_HAVE_UNIX_DOMAIN)
case AF_UNIX:
/* TODO length */
/* TODO length */
saun1 = (struct sockaddr_un *) sa1;
saun2 = (struct sockaddr_un *) sa2;
saun1 = (struct sockaddr_un *) sa1;
saun2 = (struct sockaddr_un *) sa2;
if (ngx_memcmp(&saun1->sun_path, &saun2->sun_path,
sizeof(saun1->sun_path))
!= 0)
{
return NGX_DECLINED;
}
if (ngx_memcmp(&saun1->sun_path, &saun2->sun_path,
sizeof(saun1->sun_path))
!= 0)
{
return NGX_DECLINED;
}
break;
break;
#endif
default: /* AF_INET */

View File

@ -33,14 +33,14 @@ typedef struct {
static ngx_command_t ngx_errlog_commands[] = {
{ngx_string("error_log"),
NGX_MAIN_CONF|NGX_CONF_1MORE,
ngx_error_log,
0,
0,
NULL},
{ ngx_string("error_log"),
NGX_MAIN_CONF|NGX_CONF_1MORE,
ngx_error_log,
0,
0,
NULL },
ngx_null_command
ngx_null_command
};
@ -585,7 +585,7 @@ ngx_log_set_log(ngx_conf_t *cf, ngx_log_t **head)
return NGX_CONF_ERROR;
}
} else if (ngx_strncmp(value[1].data, "memory:", 7) == 0) {
} else if (ngx_strncmp(value[1].data, "memory:", 7) == 0) {
#if (NGX_DEBUG)
size_t size, needed;
@ -644,7 +644,7 @@ ngx_log_set_log(ngx_conf_t *cf, ngx_log_t **head)
return NGX_CONF_ERROR;
#endif
} else if (ngx_strncmp(value[1].data, "syslog:", 7) == 0) {
} else if (ngx_strncmp(value[1].data, "syslog:", 7) == 0) {
peer = ngx_pcalloc(cf->pool, sizeof(ngx_syslog_peer_t));
if (peer == NULL) {
return NGX_CONF_ERROR;

View File

@ -220,7 +220,7 @@ ngx_parse_http_time(u_char *value, size_t len)
}
if (hour > 23 || min > 59 || sec > 59) {
return NGX_ERROR;
return NGX_ERROR;
}
if (day == 29 && month == 1) {

View File

@ -222,11 +222,11 @@ ngx_slab_alloc_locked(ngx_slab_pool_t *pool, size_t size)
if (bitmap[n] == NGX_SLAB_BUSY) {
for (n = n + 1; n < map; n++) {
if (bitmap[n] != NGX_SLAB_BUSY) {
p = (uintptr_t) bitmap + i;
if (bitmap[n] != NGX_SLAB_BUSY) {
p = (uintptr_t) bitmap + i;
goto done;
}
goto done;
}
}
prev = (ngx_slab_page_t *)

View File

@ -10,9 +10,9 @@
#define NGX_SYSLOG_MAX_STR \
NGX_MAX_ERROR_STR + sizeof("<255>Jan 01 00:00:00 ") - 1 \
+ (NGX_MAXHOSTNAMELEN - 1) + 1 /* space */ \
+ 32 /* tag */ + 2 /* colon, space */
NGX_MAX_ERROR_STR + sizeof("<255>Jan 01 00:00:00 ") - 1 \
+ (NGX_MAXHOSTNAMELEN - 1) + 1 /* space */ \
+ 32 /* tag */ + 2 /* colon, space */
static char *ngx_syslog_parse_args(ngx_conf_t *cf, ngx_syslog_peer_t *peer);

View File

@ -27,28 +27,28 @@ static ngx_str_t iocp_name = ngx_string("iocp");
static ngx_command_t ngx_iocp_commands[] = {
{ngx_string("iocp_threads"),
NGX_EVENT_CONF|NGX_CONF_TAKE1,
ngx_conf_set_num_slot,
0,
offsetof(ngx_iocp_conf_t, threads),
NULL},
{ ngx_string("iocp_threads"),
NGX_EVENT_CONF|NGX_CONF_TAKE1,
ngx_conf_set_num_slot,
0,
offsetof(ngx_iocp_conf_t, threads),
NULL },
{ngx_string("post_acceptex"),
NGX_EVENT_CONF|NGX_CONF_TAKE1,
ngx_conf_set_num_slot,
0,
offsetof(ngx_iocp_conf_t, post_acceptex),
NULL},
{ ngx_string("post_acceptex"),
NGX_EVENT_CONF|NGX_CONF_TAKE1,
ngx_conf_set_num_slot,
0,
offsetof(ngx_iocp_conf_t, post_acceptex),
NULL },
{ngx_string("acceptex_read"),
NGX_EVENT_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
0,
offsetof(ngx_iocp_conf_t, acceptex_read),
NULL},
{ ngx_string("acceptex_read"),
NGX_EVENT_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
0,
offsetof(ngx_iocp_conf_t, acceptex_read),
NULL },
ngx_null_command
ngx_null_command
};

View File

@ -188,7 +188,7 @@ typedef struct {
ngx_int_t (*notify)(ngx_event_handler_pt handler);
ngx_int_t (*process_events)(ngx_cycle_t *cycle, ngx_msec_t timer,
ngx_uint_t flags);
ngx_uint_t flags);
ngx_int_t (*init)(ngx_cycle_t *cycle, ngx_msec_t timer);
void (*done)(ngx_cycle_t *cycle);

View File

@ -2542,9 +2542,9 @@ done:
void
ngx_ssl_remove_cached_session(SSL_CTX *ssl, ngx_ssl_session_t *sess)
{
SSL_CTX_remove_session(ssl, sess);
SSL_CTX_remove_session(ssl, sess);
ngx_ssl_remove_session(ssl, sess);
ngx_ssl_remove_session(ssl, sess);
}

View File

@ -434,7 +434,7 @@ ngx_event_pipe_read_upstream(ngx_event_pipe_t *p)
/* STUB */ cl->buf->num = p->num++;
if (p->input_filter(p, cl->buf) == NGX_ERROR) {
return NGX_ABORT;
return NGX_ABORT;
}
ngx_free_chain(p->pool, cl);
@ -801,12 +801,12 @@ ngx_event_pipe_write_chain_to_temp_file(ngx_event_pipe_t *p)
}
if (cl) {
p->in = cl;
*ll = NULL;
p->in = cl;
*ll = NULL;
} else {
p->in = NULL;
p->last_in = &p->in;
p->in = NULL;
p->last_in = &p->in;
}
} else {

View File

@ -621,11 +621,11 @@ destination_done:
if ((r->uri.data[r->uri.len - 1] == '/' && *(last - 1) != '/')
|| (r->uri.data[r->uri.len - 1] != '/' && *(last - 1) == '/'))
{
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
"both URI \"%V\" and \"Destination\" URI \"%V\" "
"should be either collections or non-collections",
&r->uri, &dest->value);
return NGX_HTTP_CONFLICT;
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
"both URI \"%V\" and \"Destination\" URI \"%V\" "
"should be either collections or non-collections",
&r->uri, &dest->value);
return NGX_HTTP_CONFLICT;
}
depth = ngx_http_dav_depth(r, NGX_HTTP_DAV_INFINITY_DEPTH);

View File

@ -751,7 +751,7 @@ ngx_http_fastcgi_eval(ngx_http_request_t *r, ngx_http_fastcgi_loc_conf_t *flcf)
url.no_resolve = 1;
if (ngx_parse_url(r->pool, &url) != NGX_OK) {
if (url.err) {
if (url.err) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
"%s in upstream \"%V\"", url.err, &url.url);
}
@ -1800,7 +1800,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
} else {
r->cache->header_start += u->buffer.pos - start
- sizeof(ngx_http_fastcgi_header_t);
- sizeof(ngx_http_fastcgi_header_t);
}
f->large_stderr = 0;
@ -2558,8 +2558,8 @@ ngx_http_fastcgi_process_record(ngx_http_request_t *r,
case NGX_HTTP_FASTCGI_STDOUT:
case NGX_HTTP_FASTCGI_STDERR:
case NGX_HTTP_FASTCGI_END_REQUEST:
f->type = (ngx_uint_t) ch;
break;
f->type = (ngx_uint_t) ch;
break;
default:
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
"upstream sent invalid FastCGI "
@ -2654,7 +2654,7 @@ ngx_http_fastcgi_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
static ngx_int_t
ngx_http_fastcgi_add_variables(ngx_conf_t *cf)
{
ngx_http_variable_t *var, *v;
ngx_http_variable_t *var, *v;
for (v = ngx_http_fastcgi_vars; v->name.len; v++) {
var = ngx_http_add_variable(cf, &v->name, v->flags);

View File

@ -144,7 +144,7 @@ static ngx_command_t ngx_http_image_filter_commands[] = {
offsetof(ngx_http_image_filter_conf_t, transparency),
NULL },
{ ngx_string("image_filter_interlace"),
{ ngx_string("image_filter_interlace"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
NGX_HTTP_LOC_CONF_OFFSET,

View File

@ -2555,14 +2555,14 @@ ngx_http_mp4_crop_ctts_data(ngx_http_mp4_file_t *mp4,
"sample:%uD, count:%uD, offset:%uD",
start_sample, count, ngx_mp4_get_32value(entry->offset));
if (start_sample <= count) {
rest = start_sample - 1;
goto found;
}
if (start_sample <= count) {
rest = start_sample - 1;
goto found;
}
start_sample -= count;
entries--;
entry++;
start_sample -= count;
entries--;
entry++;
}
if (start) {

View File

@ -665,7 +665,7 @@ ngx_http_range_test_overlapped(ngx_http_request_t *r,
range = ctx->ranges.elts;
for (i = 0; i < ctx->ranges.nelts; i++) {
if (start > range[i].start || last < range[i].end) {
goto overlapped;
goto overlapped;
}
}
}

View File

@ -328,8 +328,8 @@ ngx_http_realip_from(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
#if (NGX_HAVE_UNIX_DOMAIN)
if (ngx_strcmp(value[1].data, "unix:") == 0) {
cidr->family = AF_UNIX;
return NGX_CONF_OK;
cidr->family = AF_UNIX;
return NGX_CONF_OK;
}
#endif

View File

@ -109,7 +109,7 @@ ngx_module_t ngx_http_referer_module = {
static ngx_int_t
ngx_http_referer_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v,
uintptr_t data)
uintptr_t data)
{
u_char *p, *ref, *last;
size_t len;

View File

@ -571,7 +571,7 @@ ngx_http_rewrite_if(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
mconf = module->create_loc_conf(cf);
if (mconf == NULL) {
return NGX_CONF_ERROR;
return NGX_CONF_ERROR;
}
ctx->loc_conf[cf->cycle->modules[i]->ctx_index] = mconf;

View File

@ -876,7 +876,7 @@ ngx_http_scgi_create_request(ngx_http_request_t *r)
next:
continue;
}
}
}
*b->last++ = (u_char) ',';

View File

@ -337,8 +337,8 @@ ngx_http_ssl_alpn_select(ngx_ssl_conn_t *ssl_conn, const unsigned char **out,
#if (NGX_DEBUG)
for (i = 0; i < inlen; i += in[i] + 1) {
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
"SSL ALPN supported by client: %*s", in[i], &in[i + 1]);
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
"SSL ALPN supported by client: %*s", in[i], &in[i + 1]);
}
#endif

View File

@ -259,7 +259,7 @@ failed:
/ (8 * sizeof(uintptr_t));
for (i = 0; i < n; i++) {
rrp->tried[i] = 0;
rrp->tried[i] = 0;
}
ngx_http_upstream_rr_peers_unlock(peers);

View File

@ -1222,7 +1222,7 @@ ngx_http_core_try_files_phase(ngx_http_request_t *r,
}
name = path.data + root;
}
}
if (tf->values == NULL) {
@ -3104,7 +3104,7 @@ ngx_http_core_location(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy)
ctx->loc_conf[cf->cycle->modules[i]->ctx_index] =
module->create_loc_conf(cf);
if (ctx->loc_conf[cf->cycle->modules[i]->ctx_index] == NULL) {
return NGX_CONF_ERROR;
return NGX_CONF_ERROR;
}
}
}
@ -4540,21 +4540,21 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
static ngx_http_method_name_t ngx_methods_names[] = {
{ (u_char *) "GET", (uint32_t) ~NGX_HTTP_GET },
{ (u_char *) "HEAD", (uint32_t) ~NGX_HTTP_HEAD },
{ (u_char *) "POST", (uint32_t) ~NGX_HTTP_POST },
{ (u_char *) "PUT", (uint32_t) ~NGX_HTTP_PUT },
{ (u_char *) "DELETE", (uint32_t) ~NGX_HTTP_DELETE },
{ (u_char *) "MKCOL", (uint32_t) ~NGX_HTTP_MKCOL },
{ (u_char *) "COPY", (uint32_t) ~NGX_HTTP_COPY },
{ (u_char *) "MOVE", (uint32_t) ~NGX_HTTP_MOVE },
{ (u_char *) "OPTIONS", (uint32_t) ~NGX_HTTP_OPTIONS },
{ (u_char *) "PROPFIND", (uint32_t) ~NGX_HTTP_PROPFIND },
{ (u_char *) "PROPPATCH", (uint32_t) ~NGX_HTTP_PROPPATCH },
{ (u_char *) "LOCK", (uint32_t) ~NGX_HTTP_LOCK },
{ (u_char *) "UNLOCK", (uint32_t) ~NGX_HTTP_UNLOCK },
{ (u_char *) "PATCH", (uint32_t) ~NGX_HTTP_PATCH },
{ NULL, 0 }
{ (u_char *) "GET", (uint32_t) ~NGX_HTTP_GET },
{ (u_char *) "HEAD", (uint32_t) ~NGX_HTTP_HEAD },
{ (u_char *) "POST", (uint32_t) ~NGX_HTTP_POST },
{ (u_char *) "PUT", (uint32_t) ~NGX_HTTP_PUT },
{ (u_char *) "DELETE", (uint32_t) ~NGX_HTTP_DELETE },
{ (u_char *) "MKCOL", (uint32_t) ~NGX_HTTP_MKCOL },
{ (u_char *) "COPY", (uint32_t) ~NGX_HTTP_COPY },
{ (u_char *) "MOVE", (uint32_t) ~NGX_HTTP_MOVE },
{ (u_char *) "OPTIONS", (uint32_t) ~NGX_HTTP_OPTIONS },
{ (u_char *) "PROPFIND", (uint32_t) ~NGX_HTTP_PROPFIND },
{ (u_char *) "PROPPATCH", (uint32_t) ~NGX_HTTP_PROPPATCH },
{ (u_char *) "LOCK", (uint32_t) ~NGX_HTTP_LOCK },
{ (u_char *) "UNLOCK", (uint32_t) ~NGX_HTTP_UNLOCK },
{ (u_char *) "PATCH", (uint32_t) ~NGX_HTTP_PATCH },
{ NULL, 0 }
};
@ -4627,7 +4627,7 @@ ngx_http_core_limit_except(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
mconf = module->create_loc_conf(cf);
if (mconf == NULL) {
return NGX_CONF_ERROR;
return NGX_CONF_ERROR;
}
ctx->loc_conf[cf->cycle->modules[i]->ctx_index] = mconf;

View File

@ -232,10 +232,10 @@ typedef struct {
typedef struct {
ngx_hash_combined_t names;
ngx_hash_combined_t names;
ngx_uint_t nregex;
ngx_http_server_name_t *regex;
ngx_uint_t nregex;
ngx_http_server_name_t *regex;
} ngx_http_virtual_names_t;
@ -544,7 +544,7 @@ typedef ngx_int_t (*ngx_http_request_body_filter_pt)
ngx_int_t ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *chain);
ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *chain);
ngx_int_t ngx_http_request_body_save_filter(ngx_http_request_t *r,
ngx_chain_t *chain);
ngx_chain_t *chain);
ngx_int_t ngx_http_set_disable_symlinks(ngx_http_request_t *r,

View File

@ -19,10 +19,10 @@ static ngx_int_t ngx_http_script_add_var_code(ngx_http_script_compile_t *sc,
static ngx_int_t ngx_http_script_add_args_code(ngx_http_script_compile_t *sc);
#if (NGX_PCRE)
static ngx_int_t ngx_http_script_add_capture_code(ngx_http_script_compile_t *sc,
ngx_uint_t n);
ngx_uint_t n);
#endif
static ngx_int_t
ngx_http_script_add_full_name_code(ngx_http_script_compile_t *sc);
ngx_http_script_add_full_name_code(ngx_http_script_compile_t *sc);
static size_t ngx_http_script_full_name_len_code(ngx_http_script_engine_t *e);
static void ngx_http_script_full_name_code(ngx_http_script_engine_t *e);

View File

@ -1883,17 +1883,17 @@ ngx_http_upstream_send_request_body(ngx_http_request_t *r,
if (!r->request_body_no_buffering) {
/* buffered request body */
/* buffered request body */
if (!u->request_sent) {
u->request_sent = 1;
out = u->request_bufs;
if (!u->request_sent) {
u->request_sent = 1;
out = u->request_bufs;
} else {
out = NULL;
}
} else {
out = NULL;
}
return ngx_output_chain(&u->output, out);
return ngx_output_chain(&u->output, out);
}
if (!u->request_sent) {
@ -4327,10 +4327,10 @@ ngx_http_upstream_process_cache_control(ngx_http_request_t *r,
pa = &u->headers_in.cache_control;
if (pa->elts == NULL) {
if (ngx_array_init(pa, r->pool, 2, sizeof(ngx_table_elt_t *)) != NGX_OK)
{
return NGX_ERROR;
}
if (ngx_array_init(pa, r->pool, 2, sizeof(ngx_table_elt_t *)) != NGX_OK)
{
return NGX_ERROR;
}
}
ph = ngx_array_push(pa);

View File

@ -480,7 +480,7 @@ failed:
/ (8 * sizeof(uintptr_t));
for (i = 0; i < n; i++) {
rrp->tried[i] = 0;
rrp->tried[i] = 0;
}
ngx_http_upstream_rr_peers_unlock(peers);

View File

@ -215,7 +215,7 @@ static ngx_http_variable_t ngx_http_v2_vars[] = {
static ngx_int_t
ngx_http_v2_add_variables(ngx_conf_t *cf)
{
ngx_http_variable_t *var, *v;
ngx_http_variable_t *var, *v;
for (v = ngx_http_v2_vars; v->name.len; v++) {
var = ngx_http_add_variable(cf, &v->name, v->flags);

View File

@ -342,7 +342,7 @@ typedef struct {
void *(*create_srv_conf)(ngx_conf_t *cf);
char *(*merge_srv_conf)(ngx_conf_t *cf, void *prev,
void *conf);
void *conf);
} ngx_mail_module_t;

View File

@ -42,7 +42,7 @@ static u_char smtp_username[] = "334 VXNlcm5hbWU6" CRLF;
static u_char smtp_password[] = "334 UGFzc3dvcmQ6" CRLF;
static u_char smtp_invalid_command[] = "500 5.5.1 Invalid command" CRLF;
static u_char smtp_invalid_pipelining[] =
"503 5.5.0 Improper use of SMTP command pipelining" CRLF;
"503 5.5.0 Improper use of SMTP command pipelining" CRLF;
static u_char smtp_invalid_argument[] = "501 5.5.4 Invalid argument" CRLF;
static u_char smtp_auth_required[] = "530 5.7.1 Authentication required" CRLF;
static u_char smtp_bad_sequence[] = "503 5.5.1 Bad sequence of commands" CRLF;

View File

@ -312,13 +312,13 @@ ngx_mail_ssl_merge_conf(ngx_conf_t *cf, void *parent, void *child)
conf->ssl.log = cf->log;
if (conf->enable) {
mode = "ssl";
mode = "ssl";
} else if (conf->starttls != NGX_MAIL_STARTTLS_OFF) {
mode = "starttls";
mode = "starttls";
} else {
mode = "";
mode = "";
}
if (conf->file == NULL) {

View File

@ -276,26 +276,26 @@ typedef volatile ngx_atomic_uint_t ngx_atomic_t;
static ngx_inline ngx_atomic_uint_t
ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old,
ngx_atomic_uint_t set)
ngx_atomic_uint_t set)
{
if (*lock == old) {
*lock = set;
return 1;
}
if (*lock == old) {
*lock = set;
return 1;
}
return 0;
return 0;
}
static ngx_inline ngx_atomic_int_t
ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add)
{
ngx_atomic_int_t old;
ngx_atomic_int_t old;
old = *value;
*value += add;
old = *value;
*value += add;
return old;
return old;
}
#define ngx_memory_barrier()

View File

@ -15,10 +15,10 @@
typedef struct {
ngx_uint_t command;
ngx_pid_t pid;
ngx_int_t slot;
ngx_fd_t fd;
ngx_uint_t command;
ngx_pid_t pid;
ngx_int_t slot;
ngx_fd_t fd;
} ngx_channel_t;

View File

@ -38,6 +38,6 @@
/
/ ld.so.1: nginx: fatal: hardware capability unsupported: 0x2000 [ PAUSE ]
.inline ngx_cpu_pause,0
rep; nop
.end
.inline ngx_cpu_pause,0
rep; nop
.end

View File

@ -39,6 +39,6 @@
/
/ ld.so.1: nginx: fatal: hardware capability unsupported: 0x2000 [ PAUSE ]
.inline ngx_cpu_pause,0
rep; nop
.end
.inline ngx_cpu_pause,0
rep; nop
.end

View File

@ -27,16 +27,16 @@ typedef volatile ngx_atomic_uint_t ngx_atomic_t;
/* the new SDK headers */
#define ngx_atomic_cmp_set(lock, old, set) \
((ngx_atomic_uint_t) InterlockedCompareExchange((long *) lock, set, old) \
== old)
((ngx_atomic_uint_t) InterlockedCompareExchange((long *) lock, set, old) \
== old)
#else
/* the old MS VC6.0SP2 SDK headers */
#define ngx_atomic_cmp_set(lock, old, set) \
(InterlockedCompareExchange((void **) lock, (void *) set, (void *) old) \
== (void *) old)
(InterlockedCompareExchange((void **) lock, (void *) set, (void *) old) \
== (void *) old)
#endif

View File

@ -233,11 +233,11 @@ ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
} else if (ngx_event_flags & NGX_USE_IOCP_EVENT) {
/*
* if a socket was bound with I/O completion port then
* GetQueuedCompletionStatus() would anyway return its status
* despite that WSASend() was already complete
*/
/*
* if a socket was bound with I/O completion port then
* GetQueuedCompletionStatus() would anyway return its status
* despite that WSASend() was already complete
*/
wev->active = 1;
return in;

View File

@ -254,7 +254,7 @@ failed:
/ (8 * sizeof(uintptr_t));
for (i = 0; i < n; i++) {
rrp->tried[i] = 0;
rrp->tried[i] = 0;
}
ngx_stream_upstream_rr_peers_unlock(peers);

View File

@ -356,7 +356,7 @@ failed:
/ (8 * sizeof(uintptr_t));
for (i = 0; i < n; i++) {
rrp->tried[i] = 0;
rrp->tried[i] = 0;
}
ngx_stream_upstream_rr_peers_unlock(peers);