This is an archive of the discontinued Mercurial Phabricator instance.

index: avoid duplicating capacity-growth expression
ClosedPublic

Authored by martinvonz on Aug 9 2018, 3:27 AM.

Details

Summary

We were duplicating the "*2" instead of reusing it. It's overflow-safe
to reuse as long as the growth factor (i.e. currently 2) is not larger
than sizeof(nodetreenode) (currently 64 or 128).

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.