summaryrefslogtreecommitdiff
path: root/src/expire.c
diff options
context:
space:
mode:
authorhouzj.fnst <63178771+sherlockcpp@users.noreply.github.com>2021-01-14 04:00:55 +0800
committerGitHub <noreply@github.com>2021-01-13 12:00:55 -0800
commitf5577fdbd8898112427e5807edf102f9fcd9da33 (patch)
tree869b3a3d7fb8fa8c9c5778cab9158a4d97d251e3 /src/expire.c
parent8a81ed1b5ab204fd33651bf448cd5e1230631fb7 (diff)
downloadredis-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.c2
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