[njs] Style fixes.

Igor Sysoev igor at sysoev.ru
Tue Apr 3 14:56:30 UTC 2018


details:   http://hg.nginx.org/njs/rev/39374a5d6cda
branches:  
changeset: 489:39374a5d6cda
user:      Igor Sysoev <igor at sysoev.ru>
date:      Tue Apr 03 17:55:23 2018 +0300
description:
Style fixes.

diffstat:

 njs/njs_parser.h            |   4 ++--
 njs/njs_parser_expression.c |  20 ++++++++++----------
 njs/njs_vm.c                |   4 +---
 3 files changed, 13 insertions(+), 15 deletions(-)

diffs (66 lines):

diff -r addefc71957b -r 39374a5d6cda njs/njs_parser.h
--- a/njs/njs_parser.h	Tue Apr 03 17:55:08 2018 +0300
+++ b/njs/njs_parser.h	Tue Apr 03 17:55:23 2018 +0300
@@ -389,9 +389,9 @@ nxt_bool_t njs_parser_has_side_effect(nj
 u_char *njs_parser_trace_handler(nxt_trace_t *trace, nxt_trace_data_t *td,
     u_char *start);
 void njs_parser_syntax_error(njs_vm_t *vm, njs_parser_t *parser,
-	const char* fmt, ...);
+    const char* fmt, ...);
 void njs_parser_ref_error(njs_vm_t *vm, njs_parser_t *parser, const char* fmt,
-	...);
+    ...);
 nxt_int_t njs_generate_scope(njs_vm_t *vm, njs_parser_t *parser,
     njs_parser_node_t *node);
 
diff -r addefc71957b -r 39374a5d6cda njs/njs_parser_expression.c
--- a/njs/njs_parser_expression.c	Tue Apr 03 17:55:08 2018 +0300
+++ b/njs/njs_parser_expression.c	Tue Apr 03 17:55:23 2018 +0300
@@ -873,11 +873,11 @@ njs_parser_inc_dec_expression(njs_vm_t *
     node->left = parser->node;
     parser->node = node;
 
-    parser->code_size += (node->token == NJS_TOKEN_NAME) ?
-                             sizeof(njs_vmcode_3addr_t):
-                             sizeof(njs_vmcode_prop_get_t)
-                             + sizeof(njs_vmcode_3addr_t)
-                             + sizeof(njs_vmcode_prop_set_t);
+    parser->code_size += (token == NJS_TOKEN_NAME)
+                             ? sizeof(njs_vmcode_3addr_t)
+                             : sizeof(njs_vmcode_prop_get_t)
+                               + sizeof(njs_vmcode_3addr_t)
+                               + sizeof(njs_vmcode_prop_set_t);
 
     return next;
 }
@@ -929,11 +929,11 @@ njs_parser_post_inc_dec_expression(njs_v
     node->left = parser->node;
     parser->node = node;
 
-    parser->code_size += (parser->node->token == NJS_TOKEN_NAME) ?
-                             sizeof(njs_vmcode_3addr_t):
-                             sizeof(njs_vmcode_prop_get_t)
-                             + sizeof(njs_vmcode_3addr_t)
-                             + sizeof(njs_vmcode_prop_set_t);
+    parser->code_size += (token == NJS_TOKEN_NAME)
+                             ? sizeof(njs_vmcode_3addr_t)
+                             : sizeof(njs_vmcode_prop_get_t)
+                               + sizeof(njs_vmcode_3addr_t)
+                               + sizeof(njs_vmcode_prop_set_t);
 
     return njs_parser_token(parser);
 }
diff -r addefc71957b -r 39374a5d6cda njs/njs_vm.c
--- a/njs/njs_vm.c	Tue Apr 03 17:55:08 2018 +0300
+++ b/njs/njs_vm.c	Tue Apr 03 17:55:23 2018 +0300
@@ -2394,9 +2394,7 @@ njs_vmcode_method_frame(njs_vm_t *vm, nj
         break;
 
     case NXT_ERROR:
-
-        /* An exception was set in  njs_property_query(). */
-
+        /* An exception was set in njs_property_query(). */
         return NXT_ERROR;
 
     default:


More information about the nginx-devel mailing list