From f5577fdbd8898112427e5807edf102f9fcd9da33 Mon Sep 17 00:00:00 2001 From: "houzj.fnst" <63178771+sherlockcpp@users.noreply.github.com> Date: Thu, 14 Jan 2021 04:00:55 +0800 Subject: remove some unnecessary checks (#7431) Remove several checks that always evaluate to true. --- src/expire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/expire.c') diff --git a/src/expire.c b/src/expire.c index 275a735a7..d2945524c 100644 --- a/src/expire.c +++ b/src/expire.c @@ -224,7 +224,7 @@ void activeExpireCycle(int type) { /* When there are less than 1% filled slots, sampling the key * space is expensive, so stop here waiting for better times... * The dictionary will be resized asap. */ - if (num && slots > DICT_HT_INITIAL_SIZE && + if (slots > DICT_HT_INITIAL_SIZE && (num*100/slots < 1)) break; /* The main collection cycle. Sample random keys among keys -- cgit v1.2.1