Style.
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index fb72656..c60d5fb 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -613,9 +613,9 @@
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;
}
}
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index 572def2..5a53bac 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -47,21 +47,21 @@
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 @@
#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,
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 19a2ab7..b0d162a 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -95,25 +95,25 @@
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;
diff --git a/src/core/ngx_crypt.c b/src/core/ngx_crypt.c
index d7d068c..9db74f4 100644
--- a/src/core/ngx_crypt.c
+++ b/src/core/ngx_crypt.c
@@ -165,8 +165,8 @@
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
while (n--) {
- *p++ = itoa64[v & 0x3f];
- v >>= 6;
+ *p++ = itoa64[v & 0x3f];
+ v >>= 6;
}
return p;
diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h
index cfdbb55..c51b7ff 100644
--- a/src/core/ngx_cycle.h
+++ b/src/core/ngx_cycle.h
@@ -79,35 +79,35 @@
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;
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c
index d3e2ece..6c16e20 100644
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -155,7 +155,7 @@
#if 0
for (i = 0; i < file->name.len; i++) {
- file->name.data[i] = 'X';
+ file->name.data[i] = 'X';
}
#endif
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c
index 3bbadb8..765bda5 100644
--- a/src/core/ngx_inet.c
+++ b/src/core/ngx_inet.c
@@ -1242,19 +1242,19 @@
#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 */
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index 0893871..e720079 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -33,14 +33,14 @@
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 @@
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 @@
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;
diff --git a/src/core/ngx_parse_time.c b/src/core/ngx_parse_time.c
index 831cc71..13afde3 100644
--- a/src/core/ngx_parse_time.c
+++ b/src/core/ngx_parse_time.c
@@ -220,7 +220,7 @@
}
if (hour > 23 || min > 59 || sec > 59) {
- return NGX_ERROR;
+ return NGX_ERROR;
}
if (day == 29 && month == 1) {
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c
index c112506..fa2a646 100644
--- a/src/core/ngx_slab.c
+++ b/src/core/ngx_slab.c
@@ -222,11 +222,11 @@
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 *)
diff --git a/src/core/ngx_syslog.c b/src/core/ngx_syslog.c
index 08f4c04..0a67928 100644
--- a/src/core/ngx_syslog.c
+++ b/src/core/ngx_syslog.c
@@ -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);