Fixed indentation.
Some lines (incorrectly) had an indentation of 3 or 5, or 7 or 9, or 11 or 13, or 15 or 17 spaces instead of 4, 8, 12, or 16. Fix them. Found with: $ find src -type f | xargs grep -n '^ [^ ]'; $ find src -type f | xargs grep -n '^ [^ *]'; $ find src -type f | xargs grep -n '^ [^ ]'; $ find src -type f | xargs grep -n '^ [^ *]'; $ find src -type f | xargs grep -n '^ [^ +]'; $ find src -type f | xargs grep -n '^ [^ *+]'; $ find src -type f | xargs grep -n '^ [^ +]'; $ find src -type f | xargs grep -n '^ [^ *+]';
This commit is contained in:
@@ -1175,7 +1175,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint {
|
||||
} else if (state == State.WRITER_WRITING) {
|
||||
// NO-OP. Leave state as is.
|
||||
} else if (state == State.STREAM_WRITING) {
|
||||
// NO-OP. Leave state as is.
|
||||
// NO-OP. Leave state as is.
|
||||
} else {
|
||||
// Should never happen
|
||||
// The if ... else ... blocks above should cover all states
|
||||
|
||||
@@ -384,7 +384,7 @@ nxt_clone_vldt_credential_gidmap(nxt_task_t *task,
|
||||
}
|
||||
|
||||
return NXT_OK;
|
||||
}
|
||||
}
|
||||
|
||||
base_ok = 0;
|
||||
gids_ok = 0;
|
||||
|
||||
@@ -114,7 +114,7 @@ static nxt_int_t nxt_conf_vldt_pass(nxt_conf_validation_t *vldt,
|
||||
static nxt_int_t nxt_conf_vldt_return(nxt_conf_validation_t *vldt,
|
||||
nxt_conf_value_t *value, void *data);
|
||||
static nxt_int_t nxt_conf_vldt_share(nxt_conf_validation_t *vldt,
|
||||
nxt_conf_value_t *value, void *data);
|
||||
nxt_conf_value_t *value, void *data);
|
||||
static nxt_int_t nxt_conf_vldt_share_element(nxt_conf_validation_t *vldt,
|
||||
nxt_conf_value_t *value);
|
||||
static nxt_int_t nxt_conf_vldt_proxy(nxt_conf_validation_t *vldt,
|
||||
@@ -194,7 +194,7 @@ static nxt_int_t nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt,
|
||||
static nxt_int_t nxt_conf_vldt_java_option(nxt_conf_validation_t *vldt,
|
||||
nxt_conf_value_t *value);
|
||||
static nxt_int_t nxt_conf_vldt_upstream(nxt_conf_validation_t *vldt,
|
||||
nxt_str_t *name, nxt_conf_value_t *value);
|
||||
nxt_str_t *name, nxt_conf_value_t *value);
|
||||
static nxt_int_t nxt_conf_vldt_server(nxt_conf_validation_t *vldt,
|
||||
nxt_str_t *name, nxt_conf_value_t *value);
|
||||
static nxt_int_t nxt_conf_vldt_server_weight(nxt_conf_validation_t *vldt,
|
||||
@@ -2448,7 +2448,7 @@ nxt_conf_vldt_object(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ret = nxt_conf_vldt_type(vldt, &name, member, vals->type);
|
||||
if (ret != NXT_OK) {
|
||||
|
||||
@@ -708,11 +708,11 @@ nxt_gnutls_log_error_level(nxt_event_conn_t *c, ssize_t err)
|
||||
|
||||
case GNUTLS_E_UNKNOWN_CIPHER_SUITE: /* -21 */
|
||||
|
||||
/* Disable gnutls_bye(), because it returns GNUTLS_E_INTERNAL_ERROR. */
|
||||
/* Disable gnutls_bye(), because it returns GNUTLS_E_INTERNAL_ERROR. */
|
||||
ssltls = c->u.ssltls;
|
||||
ssltls->no_shutdown = 1;
|
||||
|
||||
/* Fall through. */
|
||||
/* Fall through. */
|
||||
|
||||
case GNUTLS_E_UNEXPECTED_PACKET_LENGTH: /* -9 */
|
||||
c->socket.error = 1000; /* Nonexistent errno code. */
|
||||
|
||||
@@ -1881,11 +1881,11 @@ nxt_h1p_idle_timeout(nxt_task_t *task, void *obj, void *data)
|
||||
|
||||
|
||||
#define NXT_H1P_IDLE_TIMEOUT \
|
||||
"HTTP/1.1 408 Request Timeout\r\n" \
|
||||
"Server: " NXT_SERVER "\r\n" \
|
||||
"Connection: close\r\n" \
|
||||
"Content-Length: 0\r\n" \
|
||||
"Date: "
|
||||
"HTTP/1.1 408 Request Timeout\r\n" \
|
||||
"Server: " NXT_SERVER "\r\n" \
|
||||
"Connection: close\r\n" \
|
||||
"Content-Length: 0\r\n" \
|
||||
"Date: "
|
||||
|
||||
|
||||
static void
|
||||
|
||||
@@ -90,17 +90,17 @@ typedef union {
|
||||
|
||||
#define nxt_http_field_name_set(_field, _name) \
|
||||
do { \
|
||||
(_field)->name_length = nxt_length(_name); \
|
||||
(_field)->name = (u_char *) _name; \
|
||||
(_field)->name_length = nxt_length(_name); \
|
||||
(_field)->name = (u_char *) _name; \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define nxt_http_field_set(_field, _name, _value) \
|
||||
do { \
|
||||
(_field)->name_length = nxt_length(_name); \
|
||||
(_field)->value_length = nxt_length(_value); \
|
||||
(_field)->name = (u_char *) _name; \
|
||||
(_field)->value = (u_char *) _value; \
|
||||
(_field)->name_length = nxt_length(_name); \
|
||||
(_field)->value_length = nxt_length(_value); \
|
||||
(_field)->name = (u_char *) _name; \
|
||||
(_field)->value = (u_char *) _value; \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ typedef struct {
|
||||
void (*body_read)(nxt_task_t *task, nxt_http_request_t *r);
|
||||
void (*local_addr)(nxt_task_t *task, nxt_http_request_t *r);
|
||||
void (*header_send)(nxt_task_t *task, nxt_http_request_t *r,
|
||||
nxt_work_handler_t body_handler, void *data);
|
||||
nxt_work_handler_t body_handler, void *data);
|
||||
void (*send)(nxt_task_t *task, nxt_http_request_t *r, nxt_buf_t *out);
|
||||
nxt_off_t (*body_bytes_sent)(nxt_task_t *task, nxt_http_proto_t proto);
|
||||
void (*discard)(nxt_task_t *task, nxt_http_request_t *r, nxt_buf_t *last);
|
||||
|
||||
@@ -932,7 +932,7 @@ nxt_http_route_rule_create(nxt_task_t *task, nxt_mp_t *mp,
|
||||
|
||||
nxt_http_route_addr_rule_t *
|
||||
nxt_http_route_addr_rule_create(nxt_task_t *task, nxt_mp_t *mp,
|
||||
nxt_conf_value_t *cv)
|
||||
nxt_conf_value_t *cv)
|
||||
{
|
||||
size_t size;
|
||||
uint32_t i, n;
|
||||
@@ -2294,7 +2294,7 @@ nxt_http_route_cookie_parse(nxt_array_t *cookies, u_char *start, u_char *end)
|
||||
|
||||
name = NULL;
|
||||
start = p + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (name != NULL) {
|
||||
|
||||
@@ -579,7 +579,7 @@ nxt_main_process_created_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
|
||||
-1, msg->port_msg.stream, 0, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
16
src/nxt_mp.c
16
src/nxt_mp.c
@@ -939,12 +939,12 @@ nxt_mp_chunk_free(nxt_mp_t *mp, nxt_mp_block_t *cluster, u_char *p)
|
||||
page = cluster->pages;
|
||||
|
||||
do {
|
||||
if (page->size != 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (page->size != 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
page++;
|
||||
n--;
|
||||
page++;
|
||||
n--;
|
||||
} while (n != 0);
|
||||
|
||||
/* Free cluster. */
|
||||
@@ -953,9 +953,9 @@ nxt_mp_chunk_free(nxt_mp_t *mp, nxt_mp_block_t *cluster, u_char *p)
|
||||
page = cluster->pages;
|
||||
|
||||
do {
|
||||
nxt_queue_remove(&page->link);
|
||||
page++;
|
||||
n--;
|
||||
nxt_queue_remove(&page->link);
|
||||
page++;
|
||||
n--;
|
||||
} while (n != 0);
|
||||
|
||||
nxt_rbtree_delete(&mp->blocks, &cluster->node);
|
||||
|
||||
@@ -282,9 +282,9 @@ nxt_time_parse(const u_char *p, size_t len)
|
||||
days = days - 719527 + 31 + 28;
|
||||
|
||||
s = (uint64_t) days * 86400
|
||||
+ (nxt_uint_t) hour * 3600
|
||||
+ (nxt_uint_t) min * 60
|
||||
+ (nxt_uint_t) sec;
|
||||
+ (nxt_uint_t) hour * 3600
|
||||
+ (nxt_uint_t) min * 60
|
||||
+ (nxt_uint_t) sec;
|
||||
|
||||
#if (NXT_TIME_T_SIZE <= 4)
|
||||
|
||||
|
||||
@@ -5114,9 +5114,9 @@ nxt_unit_ctx_alloc(nxt_unit_ctx_t *ctx, void *data)
|
||||
|
||||
rc = nxt_unit_ctx_init(lib, new_ctx, data);
|
||||
if (nxt_slow_path(rc != NXT_UNIT_OK)) {
|
||||
nxt_unit_free(ctx, new_ctx);
|
||||
nxt_unit_free(ctx, new_ctx);
|
||||
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
queue_fd = -1;
|
||||
|
||||
@@ -16,12 +16,12 @@ struct nxt_task_s {
|
||||
uint32_t ident;
|
||||
nxt_work_t *next_work;
|
||||
|
||||
/* TODO: exception_handler, prev/next task, subtasks. */
|
||||
/* TODO: exception_handler, prev/next task, subtasks. */
|
||||
};
|
||||
|
||||
|
||||
#define nxt_task_next_ident() \
|
||||
((uint32_t) nxt_atomic_fetch_add(&nxt_task_ident, 1) & 0x3FFFFFFF)
|
||||
((uint32_t) nxt_atomic_fetch_add(&nxt_task_ident, 1) & 0x3FFFFFFF)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -612,7 +612,7 @@ nxt_perl_psgi_env_create(PerlInterpreter *my_perl,
|
||||
do { \
|
||||
if (nxt_slow_path((FNS) != NXT_UNIT_OK)) \
|
||||
goto fail; \
|
||||
} while (0)
|
||||
} while (0)
|
||||
|
||||
#define NL(S) (S), sizeof(S)-1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user