summaryrefslogtreecommitdiff
path: root/src/benchmarks
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:29:07 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:29:07 -0400
commitd417868c90cca3d6bcbe6fa89ffdfc1cccfa2932 (patch)
tree8d7049985dc25b113a34de18406bbed9c2a0e564 /src/benchmarks
parent36c5f1026f19b919180ea11a94eb86e7708fed15 (diff)
downloadefl-d417868c90cca3d6bcbe6fa89ffdfc1cccfa2932.tar.gz
benchmarks/eina: fix possible div by zero in ecore_hash
Summary: CID 1400768 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10397
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/eina/ecore_hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/benchmarks/eina/ecore_hash.c b/src/benchmarks/eina/ecore_hash.c
index 76a5ad2e38..ae9befa6b5 100644
--- a/src/benchmarks/eina/ecore_hash.c
+++ b/src/benchmarks/eina/ecore_hash.c
@@ -416,6 +416,7 @@ ecore_hash_dump_stats(Ecore_Hash *hash)
unsigned int i;
double variance, sum_n_2 = 0, sum_n = 0;
+ if (!hash->size) return;
for (i = 0; i < ecore_prime_table[hash->size]; i++)
{
if (hash->buckets[i])