summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-03-10 11:43:56 +0100
committerantirez <antirez@gmail.com>2014-03-11 11:10:09 +0100
commitc8485703f529638e04fdb4b8f30ff1bd62d63538 (patch)
tree68b059f8bc563d6c1c21c3900c30531d178b26d2
parentd610d2343d821966bbd026e3b37b785f59f32c69 (diff)
downloadredis-c8485703f529638e04fdb4b8f30ff1bd62d63538.tar.gz
Cluster: some zunionInterGetKeys() comment trimmed.
Everything was pretty clear again from the initial statements.
-rw-r--r--src/db.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/db.c b/src/db.c
index 5170c6ed3..d6ef1307a 100644
--- a/src/db.c
+++ b/src/db.c
@@ -995,19 +995,14 @@ int *zunionInterGetKeys(struct redisCommand *cmd,robj **argv, int argc, int *num
}
/* Keys in z{union,inter}store come from two places:
- argv[1] = storage key,
- argv[3...n] = keys to intersect */
-
- /* (num+1) is (argv[2] + 1) to account for argv[1] too */
+ * argv[1] = storage key,
+ * argv[3...n] = keys to intersect */
keys = zmalloc(sizeof(int)*(num+1));
/* Add all key positions for argv[3...n] to keys[] */
for (i = 0; i < num; i++) keys[i] = 3+i;
- /* Now add the argv[1] key position (the storage key target)
- to our list of command positions containing keys.
- num is the number of source keys, but we initialized
- keys[] to size num+1, so keys[num] is safe and valid and okay. */
+ /* Finally add the argv[1] key position (the storage key target). */
keys[num] = 1;
*numkeys = num+1; /* Total keys = {union,inter} keys + storage key */
return keys;