From: Alan T. DeKok Date: Sat, 19 Jul 2025 00:03:19 +0000 (-0400) Subject: use macros for consistency with the rest of the code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb2a4da4256ff67c527aabda2afadf282d6af53f;p=thirdparty%2Ffreeradius-server.git use macros for consistency with the rest of the code --- diff --git a/src/lib/unlang/edit.c b/src/lib/unlang/edit.c index 0748646273..95f213b03c 100644 --- a/src/lib/unlang/edit.c +++ b/src/lib/unlang/edit.c @@ -973,7 +973,7 @@ static int check_rhs(request_t *request, unlang_frame_state_edit_t *state, edit_ { map_t const *map = current->map; - if (current->rhs.result.rcode == RLM_MODULE_FAIL) { + if (!XLAT_RESULT_SUCCESS(¤t->rhs.result)) { if (map->rhs) { RDEBUG("Failed expanding ... %s", map->rhs->name); } else { @@ -1360,7 +1360,7 @@ static int check_lhs(request_t *request, unlang_frame_state_edit_t *state, edit_ tmpl_dcursor_ctx_t cc; fr_dcursor_t cursor; - if (current->lhs.result.rcode == RLM_MODULE_FAIL) { + if (!XLAT_RESULT_SUCCESS(¤t->lhs.result)) { RDEBUG("Failed expanding %s ...", map->lhs->name); return -1; } @@ -1587,7 +1587,7 @@ static unlang_action_t process_edit(unlang_result_t *p_result, request_t *reques XDEBUG("MAP %s ... %s", state->current->map->lhs->name, state->current->map->rhs->name); } - state->current->lhs.result.rcode = state->current->rhs.result.rcode = RLM_MODULE_OK; + state->current->lhs.result = state->current->rhs.result = UNLANG_RESULT_RCODE(RLM_MODULE_OK); rcode = state->current->func(request, state, state->current); if (rcode < 0) {