Welcome! Log In Create A New Profile

Advanced

[njs] Removed unnecessary NULL checks introduced in 0a2a0b5a74f4.

Alexander Borisov
May 06, 2021 09:20AM
details: https://hg.nginx.org/njs/rev/c1829352e49c
branches:
changeset: 1635:c1829352e49c
user: Alexander Borisov <alexander.borisov@nginx.com>
date: Thu May 06 16:07:08 2021 +0300
description:
Removed unnecessary NULL checks introduced in 0a2a0b5a74f4.

Found by Coverity (CID 1478004).

diffstat:

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

diffs (12 lines):

diff -r 5563f2cbce5b -r c1829352e49c src/njs_parser.c
--- a/src/njs_parser.c Thu May 06 16:07:06 2021 +0300
+++ b/src/njs_parser.c Thu May 06 16:07:08 2021 +0300
@@ -7827,7 +7827,7 @@ njs_parser_reference(njs_parser_t *parse
scope = njs_function_scope(scope->parent);
}

- if (scope == NULL || scope->type == NJS_SCOPE_GLOBAL) {
+ if (scope->type == NJS_SCOPE_GLOBAL) {
njs_parser_syntax_error(parser, "\"%V\" object in global scope",
&token->text);
return NULL;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Removed unnecessary NULL checks introduced in 0a2a0b5a74f4.

Alexander Borisov 246 May 06, 2021 09:20AM



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

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready