Permalink
Browse files

Cluster: some zunionInterGetKeys() comment trimmed.

Everything was pretty clear again from the initial statements.
  • Loading branch information...
1 parent aca6cb5 commit 55b88e004414359fe8e33d7e0cf4e8454367cf6d @antirez committed Mar 10, 2014
Showing with 3 additions and 8 deletions.
  1. +3 −8 src/db.c
View
@@ -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;

0 comments on commit 55b88e0

Please sign in to comment.