From: Dmitry Volyntsev Date: Sat, 23 May 2026 01:36:33 +0000 (-0700) Subject: Parser: fixed function scope checks X-Git-Tag: 1.0.0~40 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/stylesheets/stylesheet.css?a=commitdiff_plain;h=e45fa2204aca183104e3862b00625fca6cfb309e;p=njs.git Parser: fixed function scope checks --- diff --git a/src/njs_variable.c b/src/njs_variable.c index b65e5934..7fcaed46 100644 --- a/src/njs_variable.c +++ b/src/njs_variable.c @@ -58,7 +58,7 @@ njs_variable_function_add(njs_parser_t *parser, njs_parser_scope_t *scope, } root = njs_function_scope(scope); - if (njs_slow_path(scope == NULL)) { + if (njs_slow_path(root == NULL)) { return NULL; } @@ -275,7 +275,7 @@ njs_variable_scope_add(njs_parser_t *parser, njs_parser_scope_t *scope, if (index == NJS_INDEX_NONE) { root = njs_function_scope(scope); - if (njs_slow_path(scope == NULL)) { + if (njs_slow_path(root == NULL)) { return NULL; }