From: Arran Cudbard-Bell Date: Thu, 16 Sep 2021 14:43:49 +0000 (-0500) Subject: Is clang scan really that braindead? X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3b6cbc6d39e54425f302589123a85de211849ac;p=thirdparty%2Ffreeradius-server.git Is clang scan really that braindead? --- diff --git a/src/lib/util/hw.c b/src/lib/util/hw.c index 3cb7dc63ecc..8a8e3cb636c 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); }