]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Is clang scan really that braindead?
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 16 Sep 2021 14:43:49 +0000 (09:43 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 16 Sep 2021 14:43:49 +0000 (09:43 -0500)
src/lib/util/hw.c

index 3cb7dc63ecc9e99eb159e937444228ae885e0560..8a8e3cb636c2bcb5bf86806976192061ece46d10 100644 (file)
@@ -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);
 }