summaryrefslogtreecommitdiff
path: root/src/t_set.c
diff options
context:
space:
mode:
authorPierre Jambet <pierre.jambet@gmail.com>2020-10-18 01:14:45 -0400
committerGitHub <noreply@github.com>2020-10-18 08:14:45 +0300
commitf6010e106b47c7a72026a10edc6b9b7fb79c3f04 (patch)
treee8af982effb3613e51e18d0024bae86dd884d1cb /src/t_set.c
parent786d6d55cf5ebfdce4c3ce28b0a7c4460df111f0 (diff)
downloadredis-f6010e106b47c7a72026a10edc6b9b7fb79c3f04.tar.gz
t_set.c comment update for srandmemberWithCountCommand (#7922)
Reference the correct "case", case 4, in the comment explaining the need for case 3, when the number of request items is too close to the cardinality of the set. Case 4 is indeed the "natural approach" referenced earlier in that sentence.
Diffstat (limited to 'src/t_set.c')
-rw-r--r--src/t_set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_set.c b/src/t_set.c
index b4f308963..c1e7fddef 100644
--- a/src/t_set.c
+++ b/src/t_set.c
@@ -694,7 +694,7 @@ void srandmemberWithCountCommand(client *c) {
*
* This is done because if the number of requested elements is just
* a bit less than the number of elements in the set, the natural approach
- * used into CASE 3 is highly inefficient. */
+ * used into CASE 4 is highly inefficient. */
if (count*SRANDMEMBER_SUB_STRATEGY_MUL > size) {
setTypeIterator *si;