diff options
author | antirez <antirez@gmail.com> | 2014-06-06 18:59:17 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-06-06 18:59:17 +0200 |
commit | 8b9d9d846475a7daab2576f6af42afa9eb188da2 (patch) | |
tree | 65bb9c254c920834c9b18ef0f508e613438efd9a | |
parent | 932cc3ebe5fc19a37b94fad1d47a027d6a17f3b0 (diff) | |
download | redis-zunion.tar.gz |
Remove useless var and check in zunionInterGenericCommand().zunion
-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 |