diff options
author | antirez <antirez@gmail.com> | 2014-06-06 18:59:17 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-07-22 17:38:22 +0200 |
commit | d74e422b5e1f43139dc0ffa344c7eddbe32d7e7d (patch) | |
tree | e91cd1047d69e2863f219bda55b968a684ef28bb | |
parent | 119813e96845d9e8b3e4eddd1a950372158c2229 (diff) | |
download | redis-d74e422b5e1f43139dc0ffa344c7eddbe32d7e7d.tar.gz |
Remove useless var and check in zunionInterGenericCommand().
-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 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 |