Welcome! Log In Create A New Profile

Advanced

[njs] Style.

Valentin Bartenev
May 04, 2019 10:12AM
details: https://hg.nginx.org/njs/rev/b7cdfafdc20b
branches:
changeset: 944:b7cdfafdc20b
user: Valentin Bartenev <vbart@nginx.com>
date: Sat May 04 16:59:24 2019 +0300
description:
Style.

diffstat:

njs/njs_disassembler.c | 2 --
njs/njs_function.c | 1 -
njs/njs_json.c | 8 ++++----
njs/njs_object.c | 10 +++++-----
njs/njs_parser.c | 7 +++----
njs/njs_string.c | 1 -
njs/test/njs_unit_test.c | 10 +++++-----
7 files changed, 17 insertions(+), 22 deletions(-)

diffs (123 lines):

diff -r 551d173ab9ec -r b7cdfafdc20b njs/njs_disassembler.c
--- a/njs/njs_disassembler.c Sat May 04 05:52:15 2019 +0300
+++ b/njs/njs_disassembler.c Sat May 04 16:59:24 2019 +0300
@@ -295,7 +295,6 @@ njs_disassemble(u_char *start, u_char *e
(size_t) method->method, method->nargs,
method->code.ctor ? " CTOR" : "");

-
p += sizeof(njs_vmcode_method_frame_t);
continue;
}
@@ -308,7 +307,6 @@ njs_disassemble(u_char *start, u_char *e
(size_t) prop_foreach->object,
(size_t) prop_foreach->offset);

-
p += sizeof(njs_vmcode_prop_foreach_t);
continue;
}
diff -r 551d173ab9ec -r b7cdfafdc20b njs/njs_function.c
--- a/njs/njs_function.c Sat May 04 05:52:15 2019 +0300
+++ b/njs/njs_function.c Sat May 04 16:59:24 2019 +0300
@@ -31,7 +31,6 @@ njs_function_alloc(njs_vm_t *vm, njs_fun
goto fail;
}

-
/*
* nxt_mp_zalloc() does also:
* nxt_lvlhsh_init(&function->object.hash);
diff -r 551d173ab9ec -r b7cdfafdc20b njs/njs_json.c
--- a/njs/njs_json.c Sat May 04 05:52:15 2019 +0300
+++ b/njs/njs_json.c Sat May 04 16:59:24 2019 +0300
@@ -1916,10 +1916,10 @@ njs_json_append_number(njs_json_stringif
static njs_value_t *
njs_json_wrap_value(njs_vm_t *vm, const njs_value_t *value)
{
- nxt_int_t ret;
- njs_value_t *wrapper;
- njs_object_prop_t *prop;
- nxt_lvlhsh_query_t lhq;
+ nxt_int_t ret;
+ njs_value_t *wrapper;
+ njs_object_prop_t *prop;
+ nxt_lvlhsh_query_t lhq;

wrapper = nxt_mp_alloc(vm->mem_pool, sizeof(njs_value_t));
if (nxt_slow_path(wrapper == NULL)) {
diff -r 551d173ab9ec -r b7cdfafdc20b njs/njs_object.c
--- a/njs/njs_object.c Sat May 04 05:52:15 2019 +0300
+++ b/njs/njs_object.c Sat May 04 16:59:24 2019 +0300
@@ -2619,11 +2619,11 @@ njs_value_t *
njs_property_prototype_create(njs_vm_t *vm, nxt_lvlhsh_t *hash,
njs_object_t *prototype)
{
- nxt_int_t ret;
- njs_object_prop_t *prop;
- nxt_lvlhsh_query_t lhq;
-
- static const njs_value_t proto_string = njs_string("prototype");
+ nxt_int_t ret;
+ njs_object_prop_t *prop;
+ nxt_lvlhsh_query_t lhq;
+
+ static const njs_value_t proto_string = njs_string("prototype");

prop = njs_object_prop_alloc(vm, &proto_string, &njs_value_undefined, 0);
if (nxt_slow_path(prop == NULL)) {
diff -r 551d173ab9ec -r b7cdfafdc20b njs/njs_parser.c
--- a/njs/njs_parser.c Sat May 04 05:52:15 2019 +0300
+++ b/njs/njs_parser.c Sat May 04 16:59:24 2019 +0300
@@ -1064,7 +1064,6 @@ njs_parser_var_statement(njs_vm_t *vm, n
return NJS_TOKEN_ILLEGAL;
}

-
name = njs_parser_variable_node(vm, parser,
njs_parser_text(parser),
njs_parser_key_hash(parser),
@@ -2179,9 +2178,9 @@ njs_token_t
njs_parser_arrow_expression(njs_vm_t *vm, njs_parser_t *parser,
njs_token_t token)
{
- njs_ret_t ret;
- njs_index_t index;
- njs_parser_node_t *node, *body, *parent;
+ njs_ret_t ret;
+ njs_index_t index;
+ njs_parser_node_t *node, *body, *parent;
njs_function_lambda_t *lambda;

node = njs_parser_node_new(vm, parser, NJS_TOKEN_FUNCTION_EXPRESSION);
diff -r 551d173ab9ec -r b7cdfafdc20b njs/njs_string.c
--- a/njs/njs_string.c Sat May 04 05:52:15 2019 +0300
+++ b/njs/njs_string.c Sat May 04 16:59:24 2019 +0300
@@ -598,7 +598,6 @@ static const njs_object_prop_t njs_stri
NJS_SKIP_ARG, NJS_STRING_ARG),
},

-
/* String.fromCharCode(). */
{
.type = NJS_METHOD,
diff -r 551d173ab9ec -r b7cdfafdc20b njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c Sat May 04 05:52:15 2019 +0300
+++ b/njs/test/njs_unit_test.c Sat May 04 16:59:24 2019 +0300
@@ -13104,11 +13104,11 @@ done:
static nxt_int_t
njs_timezone_optional_test(nxt_bool_t disassemble, nxt_bool_t verbose)
{
- size_t size;
- u_char buf[16];
- time_t clock;
- struct tm tm;
- nxt_int_t ret;
+ size_t size;
+ u_char buf[16];
+ time_t clock;
+ struct tm tm;
+ nxt_int_t ret;

/*
* Chatham Islands NZ-CHAT time zone.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Style.

Valentin Bartenev 380 May 04, 2019 10:12AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 301
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready