diff options
-rw-r--r-- | src/t_zset.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/t_zset.c b/src/t_zset.c index e567e3bb0..0e793a74b 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -1989,8 +1989,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) { if (setnum) { /* Our union is at least as large as the largest set. * Resize the dictionary ASAP to avoid useless rehashing. */ - int minlen = setnum ? zuiLength(&src[setnum-1]) : 0; - dictExpand(accumulator,minlen); + dictExpand(accumulator,zuiLength(&src[setnum-1])); } /* Step 1: Create a dictionary of elements -> aggregated-scores |