summaryrefslogtreecommitdiff
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
parent36c5f1026f19b919180ea11a94eb86e7708fed15 (diff)
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
-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 76a5ad2..ae9befa 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)
416 unsigned int i; 416 unsigned int i;
417 double variance, sum_n_2 = 0, sum_n = 0; 417 double variance, sum_n_2 = 0, sum_n = 0;
418 418
419 if (!hash->size) return;
419 for (i = 0; i < ecore_prime_table[hash->size]; i++) 420 for (i = 0; i < ecore_prime_table[hash->size]; i++)
420 { 421 {
421 if (hash->buckets[i]) 422 if (hash->buckets[i])