From 323f8eeff892525cacd298efeceb4740f24479c9 Mon Sep 17 00:00:00 2001 From: Jeremy Overesch <10420943+jovere@users.noreply.github.com> Date: Wed, 3 Nov 2021 01:04:12 -0500 Subject: [PATCH] Change != to < in ipool to get rid of erroneous clang-tidy nullptr dereference warning (#457) --- include/etl/ipool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/etl/ipool.h b/include/etl/ipool.h index 44802f81..66e7fc03 100644 --- a/include/etl/ipool.h +++ b/include/etl/ipool.h @@ -353,7 +353,7 @@ namespace etl p_value = p_next; ++items_allocated; - if (items_allocated != Max_Size) + if (items_allocated < Max_Size) { // Set up the pointer to the next free item p_next = *reinterpret_cast(p_next);