]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
shut up clang
authorAlan T. DeKok <aland@freeradius.org>
Sun, 5 Dec 2021 13:40:49 +0000 (08:40 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 5 Dec 2021 13:41:35 +0000 (08:41 -0500)
src/lib/server/cond_eval.c

index ef01cc2e3eaa588bbe1919cef78da695d71720bb..24db8a98533ccf4d5c27edaa60160b355f48ca81 100644 (file)
@@ -528,6 +528,7 @@ static bool cond_compare_attrs(request_t *request, fr_value_box_t *lhs, map_t co
 
        if (tmpl_is_attr(map->lhs) && fr_type_is_null(map->lhs->cast)) da = tmpl_da(map->lhs);
 
+       fr_assert(lhs != NULL);
        rhs = NULL;             /* shut up clang scan */
        fr_value_box_init_null(&rhs_cast);
 
@@ -541,7 +542,7 @@ static bool cond_compare_attrs(request_t *request, fr_value_box_t *lhs, map_t co
                        break;
                }
 
-               fr_assert(lhs->type == rhs->type);
+               fr_assert(rhs && (lhs->type == rhs->type));
 
                rcode = fr_value_box_cmp_op(map->op, lhs, rhs);