]> git.kaiwu.me - njs.git/commitdiff
Style fixes.
authorIgor Sysoev <igor@sysoev.ru>
Tue, 8 Aug 2017 14:47:53 +0000 (17:47 +0300)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 8 Aug 2017 14:47:53 +0000 (17:47 +0300)
njs/njs_generator.c
njs/njs_variable.c

index b058b7d6bbaa9fa4a41f282bdda5b93d3caceadd..421f144482d5960909fb3b5df58ebd2f0c926183 100644 (file)
@@ -380,7 +380,7 @@ njs_generate_builtin_object(njs_vm_t *vm, njs_parser_t *parser,
 
     node->index = njs_generator_dest_index(vm, parser, node);
     if (nxt_slow_path(node->index == NJS_INDEX_ERROR)) {
-        return node->index;
+        return NXT_ERROR;
     }
 
     njs_generate_code(parser, njs_vmcode_object_copy_t, copy);
@@ -2541,13 +2541,11 @@ njs_generator_temp_index_get(njs_vm_t *vm, njs_parser_t *parser,
     }
 
     if (vm->accumulative && scope->type == NJS_SCOPE_GLOBAL) {
-
         /*
          * When non-clonable VM runs in accumulative mode
          * all global variables are allocated in absolute scope
          * to simplify global scope handling.
          */
-
         value = nxt_mem_cache_align(vm->mem_cache_pool, sizeof(njs_value_t),
                                     sizeof(njs_value_t));
         if (nxt_slow_path(value == NULL)) {
@@ -2557,7 +2555,6 @@ njs_generator_temp_index_get(njs_vm_t *vm, njs_parser_t *parser,
         index = (njs_index_t) value;
 
     } else {
-
         value = nxt_array_add(scope->values[0], &njs_array_mem_proto,
                               vm->mem_cache_pool);
         if (nxt_slow_path(value == NULL)) {
index 9d2faad6b0e5f9d124ebabc4da40e58761dc38ba..70bd2623f970be47a1d4440078f3a268909d1e50 100644 (file)
@@ -356,13 +356,11 @@ njs_variable_get(njs_vm_t *vm, njs_parser_node_t *node)
     }
 
     if (vm->accumulative && vs.scope->type == NJS_SCOPE_GLOBAL) {
-
         /*
          * When non-clonable VM runs in accumulative mode all
          * global variables should be allocated in absolute scope
          * to share them among consecutive VM invocations.
          */
-
         value = nxt_mem_cache_align(vm->mem_cache_pool, sizeof(njs_value_t),
                                     sizeof(njs_value_t));
         if (nxt_slow_path(value == NULL)) {
@@ -391,7 +389,6 @@ njs_variable_get(njs_vm_t *vm, njs_parser_node_t *node)
 
         index = vs.scope->next_index[n];
         vs.scope->next_index[n] += sizeof(njs_value_t);
-
     }
 
     if (njs_is_object(&var->value)) {