]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
try to quiet analyzer
authorAlan T. DeKok <aland@freeradius.org>
Thu, 26 Sep 2019 16:16:06 +0000 (12:16 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 26 Sep 2019 16:16:06 +0000 (12:16 -0400)
src/lib/unlang/load_balance.c

index 58957595a8e4a7318ee1a0771d3fdc81781eb6bb..e9d5f6bab4a6015a12718ded6aecff0380864ad6 100644 (file)
@@ -39,6 +39,12 @@ static unlang_action_t unlang_load_balance_next(REQUEST *request, rlm_rcode_t *p
 
        redundant = talloc_get_type_abort(frame->state, unlang_frame_state_redundant_t);
 
+#ifdef __clang_analyzer__
+       if (!redundant->found) {
+               *presult = RLM_MODULE_FAIL:
+               return UNLANG_ACTION_CALCULATE_RESULT;
+       }
+#endif
        /*
         *      Set up the first round versus subsequent ones.
         */
@@ -90,7 +96,6 @@ static unlang_action_t unlang_load_balance_next(REQUEST *request, rlm_rcode_t *p
         *      modules in the unlang_frame_state_redundant_t
         *      structure.
         */
-       rad_assert(redundant->child != NULL);
        redundant->child = redundant->child->next;
        if (!redundant->child) redundant->child = g->children;