]> git.kaiwu.me - njs.git/commitdiff
Removed unnecessary NULL checks introduced in 0a2a0b5a74f4.
authorAlexander Borisov <alexander.borisov@nginx.com>
Thu, 6 May 2021 13:07:08 +0000 (16:07 +0300)
committerAlexander Borisov <alexander.borisov@nginx.com>
Thu, 6 May 2021 13:07:08 +0000 (16:07 +0300)
Found by Coverity (CID 1478004).

src/njs_parser.c

index aae187da4cd98b705441e22edbe7f2089533351d..aaa99b636e0e7170a10177fb343dbf03c708c1e9 100644 (file)
@@ -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;