From 8b9d9d846475a7daab2576f6af42afa9eb188da2 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 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 -- cgit v1.2.1