diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2019-10-18 13:29:07 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2019-10-18 13:29:07 -0400 |
commit | d417868c90cca3d6bcbe6fa89ffdfc1cccfa2932 (patch) | |
tree | 8d7049985dc25b113a34de18406bbed9c2a0e564 /src | |
parent | 36c5f1026f19b919180ea11a94eb86e7708fed15 (diff) | |
download | efl-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')
-rw-r--r-- | src/benchmarks/eina/ecore_hash.c | 1 |
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]) |