From 529e346e65381a019e11c2dae3aea119038b91b7 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 18 Oct 2019 13:29:07 -0400 Subject: [PATCH] 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 --- src/benchmarks/eina/ecore_hash.c | 1 + 1 file changed, 1 insertion(+) 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) 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]) -- 2.7.4