From: Alan T. DeKok Date: Sun, 24 Sep 2023 14:31:46 +0000 (-0400) Subject: allow local variables in case, but not in switch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13cb087d45d79d75479fa04ac18800bf49f2781f;p=thirdparty%2Ffreeradius-server.git allow local variables in case, but not in switch --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 69693506458..4b0082e0b6f 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -1725,12 +1725,12 @@ static unlang_t *compile_variable(unlang_t *parent, unlang_compile_t *unlang_ctx * Enforce locations for local variables. */ switch (parent->type) { - case UNLANG_TYPE_GROUP: - case UNLANG_TYPE_IF: + case UNLANG_TYPE_CASE: case UNLANG_TYPE_ELSE: case UNLANG_TYPE_ELSIF: - case UNLANG_TYPE_SWITCH: case UNLANG_TYPE_FOREACH: + case UNLANG_TYPE_GROUP: + case UNLANG_TYPE_IF: case UNLANG_TYPE_TIMEOUT: case UNLANG_TYPE_LIMIT: case UNLANG_TYPE_POLICY: