]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move actions to struct
authorAlan T. DeKok <aland@freeradius.org>
Wed, 25 Aug 2021 12:26:35 +0000 (08:26 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 25 Aug 2021 12:26:35 +0000 (08:26 -0400)
src/lib/unlang/compile.c

index 108228664b228ee36c88f6402031b1a9a8cc3f65..d8de6d43250451cb3b496ddd187a39ee2886a8bb 100644 (file)
@@ -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];
                }
        }
 }