Remove useless var and check in zunionInterGenericCommand().

This commit is contained in:
antirez 2014-06-06 18:59:17 +02:00
parent 119813e968
commit d74e422b5e

View File

@ -1989,8 +1989,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
if (setnum) { if (setnum) {
/* Our union is at least as large as the largest set. /* Our union is at least as large as the largest set.
* Resize the dictionary ASAP to avoid useless rehashing. */ * Resize the dictionary ASAP to avoid useless rehashing. */
int minlen = setnum ? zuiLength(&src[setnum-1]) : 0; dictExpand(accumulator,zuiLength(&src[setnum-1]));
dictExpand(accumulator,minlen);
} }
/* Step 1: Create a dictionary of elements -> aggregated-scores /* Step 1: Create a dictionary of elements -> aggregated-scores