[njs] Removed check variable type for CLI completions.

Alexander Borisov alexander.borisov at nginx.com
Thu May 6 13:18:39 UTC 2021


details:   https://hg.nginx.org/njs/rev/637bc81166a6
branches:  
changeset: 1636:637bc81166a6
user:      Alexander Borisov <alexander.borisov at nginx.com>
date:      Thu May 06 16:07:09 2021 +0300
description:
Removed check variable type for CLI completions.

Found by Coverity (CID 1478003).

diffstat:

 src/njs_builtin.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r c1829352e49c -r 637bc81166a6 src/njs_builtin.c
--- a/src/njs_builtin.c	Thu May 06 16:07:08 2021 +0300
+++ b/src/njs_builtin.c	Thu May 06 16:07:09 2021 +0300
@@ -639,7 +639,7 @@ njs_vm_expression_completions(njs_vm_t *
     }
 
     var = ((njs_variable_node_t *) node)->variable;
-    value = njs_scope_valid_value(vm, var->index);
+    value = njs_scope_value(vm, var->index);
 
     if (!njs_is_object(value)) {
         return NULL;


More information about the nginx-devel mailing list