summaryrefslogtreecommitdiffstats
path: root/lib/hash.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-07-11 17:14:09 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-07-11 20:43:50 +0200
commit62c3d0260cb8820ab50dc2ec28d9b0dd95b0690f (patch)
treea0ba4f2519e2e0a6d9de6b505c583279fe8e825c /lib/hash.h
parentMerge branch 'evpn-prep' (diff)
downloadfrr-62c3d0260cb8820ab50dc2ec28d9b0dd95b0690f.tar.xz
frr-62c3d0260cb8820ab50dc2ec28d9b0dd95b0690f.zip
lib: use 32-bit atomics, s/pow/mul
Some platforms don't support 64-bit atomics, missed converting a floating point pow() to an integral mul when changing SD algo. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/hash.h')
-rw-r--r--lib/hash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hash.h b/lib/hash.h
index 01d2b1ddc..3b2671afa 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -53,9 +53,9 @@ struct hash_backet
struct hashstats
{
/* number of empty hash buckets */
- _Atomic int empty;
+ _Atomic uint_fast32_t empty;
/* sum of squares of bucket length */
- _Atomic uint64_t ssq;
+ _Atomic uint_fast32_t ssq;
};
struct hash