From: Alexander Borisov Date: Thu, 6 May 2021 13:07:08 +0000 (+0300) Subject: Removed unnecessary NULL checks introduced in 0a2a0b5a74f4. X-Git-Tag: 0.6.0~26 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=6805662104cdf064d78f0059271cebd5bacfcbc3;p=njs.git Removed unnecessary NULL checks introduced in 0a2a0b5a74f4. Found by Coverity (CID 1478004). --- 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;