From: Alan T. DeKok Date: Sat, 29 Mar 2025 23:02:30 +0000 (-0400) Subject: return VOID is not NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=098a8439a5a1d26ade318c05c96664f95a6dfd42;p=thirdparty%2Ffreeradius-server.git return VOID is not NULL this check also allows us to check that the function was declared to return nothing, but actually returned something --- diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index c6c0a63e5d3..ee8eeb21114 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -1010,20 +1010,15 @@ xlat_action_t xlat_frame_eval_repeat(TALLOC_CTX *ctx, fr_dcursor_t *out, case XLAT_ACTION_DONE: /* Process the result */ fr_dcursor_next(out); - /* - * Don't print out results if there are no results. - */ - if (!fr_type_is_void(node->call.func->return_type)) { - REXDENT(); - xlat_debug_log_result(request, *in, fr_dcursor_current(out)); - if (!xlat_process_return(request, node->call.func, - (fr_value_box_list_t *)out->dlist, - fr_dcursor_current(out))) { - RINDENT(); - return XLAT_ACTION_FAIL; - } + REXDENT(); + xlat_debug_log_result(request, *in, fr_dcursor_current(out)); + if (!xlat_process_return(request, node->call.func, + (fr_value_box_list_t *)out->dlist, + fr_dcursor_current(out))) { RINDENT(); + return XLAT_ACTION_FAIL; } + RINDENT(); break; } }