]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
return VOID is not NULL
authorAlan T. DeKok <aland@freeradius.org>
Sat, 29 Mar 2025 23:02:30 +0000 (19:02 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 29 Mar 2025 23:02:30 +0000 (19:02 -0400)
this check also allows us to check that the function was
declared to return nothing, but actually returned something

src/lib/unlang/xlat_eval.c

index c6c0a63e5d368f03845e5f47192afb05c37e53e3..ee8eeb21114e44aa2b7611c34898e0430a635d3e 100644 (file)
@@ -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;
                }
        }