From 6805662104cdf064d78f0059271cebd5bacfcbc3 Mon Sep 17 00:00:00 2001 From: Alexander Borisov Date: Thu, 6 May 2021 16:07:08 +0300 Subject: [PATCH] Removed unnecessary NULL checks introduced in 0a2a0b5a74f4. Found by Coverity (CID 1478004). --- src/njs_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/njs_parser.c b/src/njs_parser.c index aae187da..aaa99b63 100644 --- a/src/njs_parser.c +++ b/src/njs_parser.c @@ -7827,7 +7827,7 @@ njs_parser_reference(njs_parser_t *parser, njs_lexer_token_t *token) 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; -- 2.47.3