Commit 8b9d9d84 authored by antirez's avatar antirez
Browse files

Remove useless var and check in zunionInterGenericCommand().

parent 932cc3eb
...@@ -1989,8 +1989,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) { ...@@ -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
......
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