Welcome! Log In Create A New Profile

Advanced

[njs] Code simplification.

March 14, 2018 07:36AM
details: http://hg.nginx.org/njs/rev/895355fde02c
branches:
changeset: 458:895355fde02c
user: Igor Sysoev <igor@sysoev.ru>
date: Wed Mar 14 14:32:24 2018 +0300
description:
Code simplification.

A dead assignment left after the changeset 6738ff52a2cb was found
by Clang Static Analyzer.

diffstat:

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

diffs (31 lines):

diff -r 8a274b5f1a04 -r 895355fde02c njs/njs_vm.c
--- a/njs/njs_vm.c Tue Mar 13 20:37:01 2018 +0300
+++ b/njs/njs_vm.c Wed Mar 14 14:32:24 2018 +0300
@@ -1179,10 +1179,10 @@ njs_object_property_query(njs_vm_t *vm,

if (ret == NXT_OK) {
pq->shared = 1;
- prop = pq->lhq.value;
-
- switch (pq->query) {
- case NJS_PROPERTY_QUERY_GET:
+
+ if (pq->query == NJS_PROPERTY_QUERY_GET) {
+ prop = pq->lhq.value;
+
if (prop->type == NJS_NATIVE_GETTER) {
pq->scratch = *prop;
prop = &pq->scratch;
@@ -1193,12 +1193,6 @@ njs_object_property_query(njs_vm_t *vm,
pq->lhq.value = prop;
}
}
-
- break;
-
- case NJS_PROPERTY_QUERY_IN:
- prop = pq->lhq.value;
- break;
}

return ret;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Code simplification.

Igor Sysoev 673 March 14, 2018 07:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 69
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready