]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Make the compound literal part of the macro
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 15 Jul 2025 03:27:38 +0000 (21:27 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 15 Jul 2025 03:27:38 +0000 (21:27 -0600)
src/lib/unlang/interpret.h
src/lib/unlang/load_balance.c

index f807d3423259f592f38f2129c22a7ba86183b8a8..9a9496afda12b17e5c58647293ce50336cf0c6c9 100644 (file)
@@ -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
  */
index 57d644dc01d416d950a977722230da5f1afa7d70..55891ee3db1bac65cb5841c553c2304300a346b7 100644 (file)
@@ -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);
 
        /*