Unverified Commit f6010e10 authored by Pierre Jambet's avatar Pierre Jambet Committed by GitHub
Browse files

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.
parent 786d6d55
...@@ -694,7 +694,7 @@ void srandmemberWithCountCommand(client *c) { ...@@ -694,7 +694,7 @@ void srandmemberWithCountCommand(client *c) {
* *
* This is done because if the number of requested elements is just * 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 * 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) { if (count*SRANDMEMBER_SUB_STRATEGY_MUL > size) {
setTypeIterator *si; setTypeIterator *si;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment