From d74e422b5e1f43139dc0ffa344c7eddbe32d7e7d Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 6 Jun 2014 18:59:17 +0200 Subject: Remove useless var and check in zunionInterGenericCommand(). --- src/t_zset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/t_zset.c b/src/t_zset.c index f5f2d7b5b..20ef62e27 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 -- cgit v1.2.1