diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-03-11 17:31:59 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-03-11 17:31:59 +0300 |
commit | 22de5fcddfacd8d241ae2926125e0151b9e6e651 (patch) | |
tree | 5bb98bf2ed915b3ac59b32737f827c7ff6812724 /src | |
parent | dccb4cf3548724fbec993c5bb83edf928d0b23bf (diff) | |
download | unit-22de5fcddfacd8d241ae2926125e0151b9e6e651.tar.gz unit-22de5fcddfacd8d241ae2926125e0151b9e6e651.tar.bz2 |
Style.
Diffstat (limited to 'src')
-rw-r--r-- | src/java/nginx/unit/Context.java | 6 | ||||
-rw-r--r-- | src/nodejs/unit-http/unit.cpp | 2 | ||||
-rw-r--r-- | src/nxt_buf.h | 2 | ||||
-rw-r--r-- | src/nxt_epoll_engine.c | 2 | ||||
-rw-r--r-- | src/nxt_hpux_sendfile.c | 4 | ||||
-rw-r--r-- | src/nxt_http_parse.c | 2 | ||||
-rw-r--r-- | src/nxt_job_resolve.c | 16 | ||||
-rw-r--r-- | src/nxt_kqueue_engine.c | 2 | ||||
-rw-r--r-- | src/nxt_main_process.c | 2 | ||||
-rw-r--r-- | src/nxt_php_sapi.c | 2 | ||||
-rw-r--r-- | src/nxt_poll_engine.c | 2 | ||||
-rw-r--r-- | src/nxt_port.c | 2 | ||||
-rw-r--r-- | src/nxt_port_memory.c | 4 | ||||
-rw-r--r-- | src/nxt_sockaddr.c | 16 | ||||
-rw-r--r-- | src/nxt_socket.h | 4 | ||||
-rw-r--r-- | src/nxt_socketpair.c | 4 | ||||
-rw-r--r-- | src/nxt_sprintf.c | 12 | ||||
-rw-r--r-- | src/nxt_timer.h | 2 | ||||
-rw-r--r-- | src/nxt_unicode_lowcase.pl | 6 | ||||
-rw-r--r-- | src/nxt_unit.c | 4 |
20 files changed, 48 insertions, 48 deletions
diff --git a/src/java/nginx/unit/Context.java b/src/java/nginx/unit/Context.java index 643a336b..f6d5e339 100644 --- a/src/java/nginx/unit/Context.java +++ b/src/java/nginx/unit/Context.java @@ -306,7 +306,7 @@ public class Context implements ServletContext, InitParams PrintWriter writer = response.getWriter(); for (String n : ls) { - writer.println("<a href=\"" + n + "\">" + n + "</a><br>"); + writer.println("<a href=\"" + n + "\">" + n + "</a><br>"); } writer.close(); @@ -547,7 +547,7 @@ public class Context implements ServletContext, InitParams j = j.getParent(); } } - system_loader = j; + system_loader = j; } private boolean isSystemPath(String path) @@ -1733,7 +1733,7 @@ public class Context implements ServletContext, InitParams @Override public FileVisitResult visitFile( - Path file, BasicFileAttributes attrs) + Path file, BasicFileAttributes attrs) throws IOException { Files.delete(file); return FileVisitResult.CONTINUE; diff --git a/src/nodejs/unit-http/unit.cpp b/src/nodejs/unit-http/unit.cpp index 60b0412a..dcff1186 100644 --- a/src/nodejs/unit-http/unit.cpp +++ b/src/nodejs/unit-http/unit.cpp @@ -467,7 +467,7 @@ Unit::add_port(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port) } -inline bool +inline bool operator == (const nxt_unit_port_id_t &p1, const nxt_unit_port_id_t &p2) { return p1.pid == p2.pid && p1.id == p2.id; diff --git a/src/nxt_buf.h b/src/nxt_buf.h index d9d4ee1b..9c22d650 100644 --- a/src/nxt_buf.h +++ b/src/nxt_buf.h @@ -206,7 +206,7 @@ nxt_buf_set_last(b) \ #define \ nxt_buf_clear_last(b) \ - (b)->is_last = 0 + (b)->is_last = 0 #define \ diff --git a/src/nxt_epoll_engine.c b/src/nxt_epoll_engine.c index 9f9c8f62..9cdaab9b 100644 --- a/src/nxt_epoll_engine.c +++ b/src/nxt_epoll_engine.c @@ -1059,7 +1059,7 @@ nxt_epoll_edge_conn_io_connect(nxt_task_t *task, void *obj, void *data) state = c->write_state; - switch (nxt_socket_connect(task, c->socket.fd, c->remote) ){ + switch (nxt_socket_connect(task, c->socket.fd, c->remote)) { case NXT_OK: c->socket.write_ready = 1; diff --git a/src/nxt_hpux_sendfile.c b/src/nxt_hpux_sendfile.c index 3c42c559..df200b64 100644 --- a/src/nxt_hpux_sendfile.c +++ b/src/nxt_hpux_sendfile.c @@ -13,7 +13,7 @@ ssize_t nxt_hpux_event_conn_io_sendfile(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit); static ssize_t nxt_sys_sendfile(int s, int fd, off_t offset, size_t nbytes, - const struct iovec *hdtrl, int flags) + const struct iovec *hdtrl, int flags) { return -1; } @@ -23,7 +23,7 @@ static ssize_t nxt_sys_sendfile(int s, int fd, off_t offset, size_t nbytes, /* sendfile() is not declared if _XOPEN_SOURCE_EXTENDED is defined. */ sbsize_t sendfile(int s, int fd, off_t offset, bsize_t nbytes, - const struct iovec *hdtrl, int flags); + const struct iovec *hdtrl, int flags); #define nxt_sys_sendfile sendfile diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c index 34eaaaf9..64e4bf35 100644 --- a/src/nxt_http_parse.c +++ b/src/nxt_http_parse.c @@ -119,7 +119,7 @@ nxt_http_parse_request_init(nxt_http_request_parse_t *rp, nxt_mp_t *mp) rp->mem_pool = mp; rp->fields = nxt_list_create(mp, 8, sizeof(nxt_http_field_t)); - if (nxt_slow_path(rp->fields == NULL)){ + if (nxt_slow_path(rp->fields == NULL)) { return NXT_ERROR; } diff --git a/src/nxt_job_resolve.c b/src/nxt_job_resolve.c index a1317756..0f1fb9aa 100644 --- a/src/nxt_job_resolve.c +++ b/src/nxt_job_resolve.c @@ -59,11 +59,11 @@ nxt_job_resolve(nxt_job_resolve_t *jbr) case AF_INET6: #endif case AF_INET: - n++; - break; + n++; + break; default: - break; + break; } } @@ -81,15 +81,15 @@ nxt_job_resolve(nxt_job_resolve_t *jbr) switch (r->ai_addr->sa_family) { #if (NXT_INET6) case AF_INET6: - length = NXT_INET6_ADDR_STR_LEN; - break; + length = NXT_INET6_ADDR_STR_LEN; + break; #endif case AF_INET: - length = NXT_INET_ADDR_STR_LEN; - break; + length = NXT_INET_ADDR_STR_LEN; + break; default: - continue; + continue; } sa = nxt_sockaddr_create(mp, r->ai_addr, r->ai_addrlen, length); diff --git a/src/nxt_kqueue_engine.c b/src/nxt_kqueue_engine.c index 0e68fbdc..0212b331 100644 --- a/src/nxt_kqueue_engine.c +++ b/src/nxt_kqueue_engine.c @@ -856,7 +856,7 @@ nxt_kqueue_conn_io_connect(nxt_task_t *task, void *obj, void *data) state = c->write_state; - switch (nxt_socket_connect(task, c->socket.fd, c->remote) ){ + switch (nxt_socket_connect(task, c->socket.fd, c->remote)) { case NXT_OK: c->socket.write_ready = 1; diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c index f756bff7..40682eb9 100644 --- a/src/nxt_main_process.c +++ b/src/nxt_main_process.c @@ -842,7 +842,7 @@ nxt_main_process_sigusr1_handler(nxt_task_t *task, void *obj, void *data) nxt_mp_destroy(mp); return; - } + } fail: diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c index 80321a85..4b71de5c 100644 --- a/src/nxt_php_sapi.c +++ b/src/nxt_php_sapi.c @@ -699,7 +699,7 @@ fail: static int nxt_php_startup(sapi_module_struct *sapi_module) { - return php_module_startup(sapi_module, NULL, 0); + return php_module_startup(sapi_module, NULL, 0); } diff --git a/src/nxt_poll_engine.c b/src/nxt_poll_engine.c index acb44a22..f514e0a9 100644 --- a/src/nxt_poll_engine.c +++ b/src/nxt_poll_engine.c @@ -370,7 +370,7 @@ nxt_poll_commit_changes(nxt_event_engine_t *engine) retval = NXT_ERROR; - next: + next: change++; diff --git a/src/nxt_port.c b/src/nxt_port.c index 30719ad3..aff46666 100644 --- a/src/nxt_port.c +++ b/src/nxt_port.c @@ -510,7 +510,7 @@ nxt_port_post(nxt_task_t *task, nxt_port_t *port, pw = nxt_zalloc(sizeof(nxt_port_work_t)); if (nxt_slow_path(pw == NULL)) { - return NXT_ERROR; + return NXT_ERROR; } nxt_atomic_fetch_add(&port->use_count, 1); diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c index 774f1f33..b908041c 100644 --- a/src/nxt_port_memory.c +++ b/src/nxt_port_memory.c @@ -49,10 +49,10 @@ nxt_port_mmap_at(nxt_port_mmaps_t *port_mmaps, uint32_t i) while (i + 1 > cap) { if (cap < 16) { - cap = cap * 2; + cap = cap * 2; } else { - cap = cap + cap / 2; + cap = cap + cap / 2; } } diff --git a/src/nxt_sockaddr.c b/src/nxt_sockaddr.c index a001c730..99cf54b4 100644 --- a/src/nxt_sockaddr.c +++ b/src/nxt_sockaddr.c @@ -197,23 +197,23 @@ nxt_getsockname(nxt_task_t *task, nxt_mp_t *mp, nxt_socket_t s) switch (sockaddr.buf.sa_family) { #if (NXT_INET6) case AF_INET6: - length = NXT_INET6_ADDR_STR_LEN; - break; + length = NXT_INET6_ADDR_STR_LEN; + break; #endif #if (NXT_HAVE_UNIX_DOMAIN) case AF_UNIX: - length = nxt_length("unix:") + socklen; + length = nxt_length("unix:") + socklen; #endif - break; + break; case AF_INET: - length = NXT_INET_ADDR_STR_LEN; - break; + length = NXT_INET_ADDR_STR_LEN; + break; default: - length = 0; - break; + length = 0; + break; } return nxt_sockaddr_create(mp, &sockaddr.buf, socklen, length); diff --git a/src/nxt_socket.h b/src/nxt_socket.h index 42ef6c53..3f00648d 100644 --- a/src/nxt_socket.h +++ b/src/nxt_socket.h @@ -112,9 +112,9 @@ NXT_EXPORT nxt_int_t nxt_socketpair_create(nxt_task_t *task, nxt_socket_t *pair); NXT_EXPORT void nxt_socketpair_close(nxt_task_t *task, nxt_socket_t *pair); NXT_EXPORT ssize_t nxt_socketpair_send(nxt_fd_event_t *ev, nxt_fd_t fd, - nxt_iobuf_t *iob, nxt_uint_t niob); + nxt_iobuf_t *iob, nxt_uint_t niob); NXT_EXPORT ssize_t nxt_socketpair_recv(nxt_fd_event_t *ev, nxt_fd_t *fd, - nxt_iobuf_t *iob, nxt_uint_t niob); + nxt_iobuf_t *iob, nxt_uint_t niob); #define \ diff --git a/src/nxt_socketpair.c b/src/nxt_socketpair.c index 0adbe1f6..10ea562e 100644 --- a/src/nxt_socketpair.c +++ b/src/nxt_socketpair.c @@ -21,9 +21,9 @@ static ssize_t nxt_sendmsg(nxt_socket_t s, nxt_fd_t fd, nxt_iobuf_t *iob, - nxt_uint_t niob); + nxt_uint_t niob); static ssize_t nxt_recvmsg(nxt_socket_t s, nxt_fd_t *fd, nxt_iobuf_t *iob, - nxt_uint_t niob); + nxt_uint_t niob); nxt_int_t diff --git a/src/nxt_sprintf.c b/src/nxt_sprintf.c index 0b387883..240f47ef 100644 --- a/src/nxt_sprintf.c +++ b/src/nxt_sprintf.c @@ -76,12 +76,12 @@ nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...) */ typedef struct { - u_char *end; - const u_char *hex; - uint32_t width; - int32_t frac_width; - uint8_t max_width; - u_char padding; + u_char *end; + const u_char *hex; + uint32_t width; + int32_t frac_width; + uint8_t max_width; + u_char padding; } nxt_sprintf_t; diff --git a/src/nxt_timer.h b/src/nxt_timer.h index 4199f0dd..3ccff848 100644 --- a/src/nxt_timer.h +++ b/src/nxt_timer.h @@ -69,7 +69,7 @@ typedef struct { nxt_uint_t mchanges; nxt_uint_t nchanges; - nxt_timer_change_t *changes; + nxt_timer_change_t *changes; } nxt_timers_t; diff --git a/src/nxt_unicode_lowcase.pl b/src/nxt_unicode_lowcase.pl index 974ae23a..abf64965 100644 --- a/src/nxt_unicode_lowcase.pl +++ b/src/nxt_unicode_lowcase.pl @@ -29,9 +29,9 @@ my $last_block_size = $max_lowcase % BLOCK_SIZE + 1; for my $block (sort { $a <=> $b } keys %blocks) { - if ($max_block < $block) { - $max_block = $block; - } + if ($max_block < $block) { + $max_block = $block; + } } diff --git a/src/nxt_unit.c b/src/nxt_unit.c index 6339aec5..88c7fa6a 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -1946,10 +1946,10 @@ nxt_unit_mmap_at(nxt_unit_mmaps_t *mmaps, uint32_t i) while (i + 1 > cap) { if (cap < 16) { - cap = cap * 2; + cap = cap * 2; } else { - cap = cap + cap / 2; + cap = cap + cap / 2; } } |