From f6010e106b47c7a72026a10edc6b9b7fb79c3f04 Mon Sep 17 00:00:00 2001 From: Pierre Jambet Date: Sun, 18 Oct 2020 01:14:45 -0400 Subject: [PATCH] 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. --- src/t_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;