score = src[0].weight * zval.score;
for (j = 1; j < setnum; j++) {
- /* It is not safe to access the hash we zset we are
+ /* It is not safe to access the zset we are
* iterating, so explicitly check for equal object. */
if (src[j].subject == src[0].subject) {
value = zval.score*src[j].weight;
}
} else if (op == REDIS_OP_UNION) {
for (i = 0; i < setnum; i++) {
- if (zuiLength(&src[0]) == 0)
+ if (zuiLength(&src[i]) == 0)
continue;
while (zuiNext(&src[i],&zval)) {
/* Because the inputs are sorted by size, it's only possible
* for sets at larger indices to hold this element. */
for (j = (i+1); j < setnum; j++) {
- /* It is not safe to access the hash we zset we are
+ /* It is not safe to access the zset we are
* iterating, so explicitly check for equal object. */
if(src[j].subject == src[i].subject) {
value = zval.score*src[j].weight;