From: Arran Cudbard-Bell Date: Tue, 15 Jul 2025 03:27:38 +0000 (-0600) Subject: Make the compound literal part of the macro X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37df2f09a57cf0226ddfe36acfaf867cb0c606f4;p=thirdparty%2Ffreeradius-server.git Make the compound literal part of the macro --- diff --git a/src/lib/unlang/interpret.h b/src/lib/unlang/interpret.h index f807d34232..9a9496afda 100644 --- a/src/lib/unlang/interpret.h +++ b/src/lib/unlang/interpret.h @@ -136,7 +136,7 @@ typedef struct { unlang_mod_action_t priority; //!< The priority or action for that rcode. } unlang_result_t; -#define UNLANG_RESULT_NOT_SET { .rcode = RLM_MODULE_NOT_SET, .priority = MOD_ACTION_NOT_SET } +#define UNLANG_RESULT_NOT_SET ((unlang_result_t){ .rcode = RLM_MODULE_NOT_SET, .priority = MOD_ACTION_NOT_SET }) /** Configuration structure to make it easier to pass configuration options to initialise the frame with */ diff --git a/src/lib/unlang/load_balance.c b/src/lib/unlang/load_balance.c index 57d644dc01..55891ee3db 100644 --- a/src/lib/unlang/load_balance.c +++ b/src/lib/unlang/load_balance.c @@ -50,7 +50,7 @@ static unlang_action_t unlang_load_balance_next(unlang_result_t *p_result, reque * We are in a resumed frame. Check if running the child resulted in a failure rcode which * requires us to keep going. If not, return to the caller. */ - switch (redundant->result.rcode) { + switch (redundant->result.rcode) { case RLM_MODULE_FAIL: case RLM_MODULE_TIMEOUT: case RLM_MODULE_NOT_SET: @@ -85,7 +85,7 @@ push: * The child begins has no result set. Resetting the results ensures that the failed code from * one child doesn't affect the next child that we run. */ - redundant->result = (unlang_result_t) UNLANG_RESULT_NOT_SET; + redundant->result = UNLANG_RESULT_NOT_SET; repeatable_set(frame); /*