mirror of
https://github.com/transmission/transmission
synced 2024-12-27 01:57:52 +00:00
in bencode.c's tr_bencMergeDicts(), call tr_bencDictReserve() so the target dict only has to alloc once to hold all of the source dict's entries.
This commit is contained in:
parent
9ddd7e0166
commit
dd643537ae
1 changed files with 2 additions and 0 deletions
|
@ -1552,6 +1552,8 @@ tr_bencMergeDicts (tr_benc * target, const tr_benc * source)
|
|||
assert (tr_bencIsDict (target));
|
||||
assert (tr_bencIsDict (source));
|
||||
|
||||
tr_bencDictReserve (target, sourceCount + tr_bencDictSize(target));
|
||||
|
||||
for (i=0; i<sourceCount; ++i)
|
||||
{
|
||||
const char * key;
|
||||
|
|
Loading…
Reference in a new issue