[njs] Removed dead store assignment in njs_vmcode_interpreter().

Dmitry Volyntsev xeioex at nginx.com
Mon Jul 29 13:23:42 UTC 2019


details:   https://hg.nginx.org/njs/rev/19aec8a00867
branches:  
changeset: 1082:19aec8a00867
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Mon Jul 29 16:22:39 2019 +0300
description:
Removed dead store assignment in njs_vmcode_interpreter().

diffstat:

 njs/njs_vmcode.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 6be62551e6d4 -r 19aec8a00867 njs/njs_vmcode.c
--- a/njs/njs_vmcode.c	Sun Jul 28 17:19:51 2019 +0300
+++ b/njs/njs_vmcode.c	Mon Jul 29 16:22:39 2019 +0300
@@ -54,7 +54,7 @@ static njs_ret_t njs_vmcode_try_end(njs_
     njs_value_t *offset);
 static njs_ret_t njs_vmcode_finally(njs_vm_t *vm, njs_value_t *invld,
     njs_value_t *retval, u_char *pc);
-static njs_ret_t njs_vmcode_reference_error(njs_vm_t *vm, u_char *pc);
+static void njs_vmcode_reference_error(njs_vm_t *vm, u_char *pc);
 
 /*
  * These functions are forbidden to inline to minimize JavaScript VM
@@ -806,7 +806,7 @@ next:
                 break;
 
             case NJS_VMCODE_REFERENCE_ERROR:
-                ret = njs_vmcode_reference_error(vm, pc);
+                njs_vmcode_reference_error(vm, pc);
                 goto error;
 
             default:
@@ -2000,7 +2000,7 @@ njs_vmcode_finally(njs_vm_t *vm, njs_val
 }
 
 
-static njs_ret_t
+static void
 njs_vmcode_reference_error(njs_vm_t *vm, u_char *pc)
 {
     nxt_str_t                     *file;
@@ -2018,6 +2018,4 @@ njs_vmcode_reference_error(njs_vm_t *vm,
         njs_reference_error(vm, "\"%V\" is not defined in %uD", &ref_err->name,
                             ref_err->token_line);
     }
-
-    return NJS_ERROR;
 }


More information about the nginx-devel mailing list