diff options
author | houzj.fnst <63178771+sherlockcpp@users.noreply.github.com> | 2021-01-14 04:00:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 12:00:55 -0800 |
commit | f5577fdbd8898112427e5807edf102f9fcd9da33 (patch) | |
tree | 869b3a3d7fb8fa8c9c5778cab9158a4d97d251e3 /src/expire.c | |
parent | 8a81ed1b5ab204fd33651bf448cd5e1230631fb7 (diff) | |
download | redis-f5577fdbd8898112427e5807edf102f9fcd9da33.tar.gz |
remove some unnecessary checks (#7431)
Remove several checks that always evaluate to true.
Diffstat (limited to 'src/expire.c')
-rw-r--r-- | src/expire.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |