From b3b6cbc6d39e54425f302589123a85de211849ac Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Thu, 16 Sep 2021 09:43:49 -0500 Subject: [PATCH] Is clang scan really that braindead? --- src/lib/util/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/util/hw.c b/src/lib/util/hw.c index 3cb7dc63ec..8a8e3cb636 100644 --- a/src/lib/util/hw.c +++ b/src/lib/util/hw.c @@ -93,7 +93,7 @@ uint32_t fr_hw_num_cores_active(void) /* * Prevent clang scanner from warning about divide by zero */ - if (!tsibs || !lcores) return 1; + if ((tsibs == 0) || (lcores == 0)) return 1; return lcores / (tsibs / lcores); } -- 2.47.2