From: Alan T. DeKok Date: Wed, 25 Aug 2021 12:26:35 +0000 (-0400) Subject: move actions to struct X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c770958a9fea72d08abf14aadfd4f2dfffe5ec42;p=thirdparty%2Ffreeradius-server.git move actions to struct --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 108228664b2..d8de6d43250 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -82,7 +82,9 @@ static char const * const comp2str[] = { "post-auth" }; -typedef int unlang_actions_t[RLM_MODULE_NUMCODES]; +typedef struct { + int actions[RLM_MODULE_NUMCODES]; +} unlang_actions_t; typedef struct { rlm_components_t component; @@ -1117,7 +1119,7 @@ static void compile_action_defaults(unlang_t *c, unlang_compile_t *unlang_ctx) */ for (i = 0; i < RLM_MODULE_NUMCODES; i++) { if (!c->actions[i]) { - c->actions[i] = unlang_ctx->actions[0][i]; + c->actions[i] = unlang_ctx->actions[0].actions[i]; } } }