[njs] A fast exit from argument normalization loop.

Igor Sysoev igor at sysoev.ru
Tue Mar 29 10:38:43 UTC 2016


details:   http://hg.nginx.org/njs/rev/91543c86f412
branches:  
changeset: 93:91543c86f412
user:      Igor Sysoev <igor at sysoev.ru>
date:      Tue Mar 29 13:38:18 2016 +0300
description:
A fast exit from argument normalization loop.
This also fixes an issue when SunC 5.9 does not set
omitted array elements to a zero.

diffstat:

 njs/njs_vm.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r f674bd8a8b76 -r 91543c86f412 njs/njs_vm.c
--- a/njs/njs_vm.c	Mon Mar 28 17:34:42 2016 +0300
+++ b/njs/njs_vm.c	Tue Mar 29 13:38:18 2016 +0300
@@ -2474,8 +2474,10 @@ njs_normalize_args(njs_vm_t *vm, njs_val
             break;
 
         case NJS_SKIP_ARG:
-
             break;
+
+        case 0:
+            return NJS_OK;
         }
 
         args++;



More information about the nginx-devel mailing list