From: Alan T. DeKok Date: Wed, 20 May 2020 17:04:10 +0000 (-0400) Subject: asserts to keep clang scan happy X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c867b4298f49335cc9c7cf4ff380bf51116da042;p=thirdparty%2Ffreeradius-server.git asserts to keep clang scan happy --- diff --git a/src/lib/util/heap.c b/src/lib/util/heap.c index a93ecb2ff57..cf5d96e5a12 100644 --- a/src/lib/util/heap.c +++ b/src/lib/util/heap.c @@ -236,6 +236,10 @@ int fr_heap_extract(fr_heap_t *hp, void *data) } } + fr_assert(parent <= hp->num_elements); + fr_assert(hp->p != NULL); + fr_assert(hp->p[parent] != NULL); + RESET_OFFSET(hp, parent); child = HEAP_LEFT(parent); while (child <= max) {