]> diplodocus.org Git - nmh/commitdiff
sbr/vector.c: Zero the growth with memset(3), not loop.
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 26 Apr 2017 23:14:28 +0000 (00:14 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 26 Apr 2017 23:14:28 +0000 (00:14 +0100)
When the resize functions grow the vectors, as they always do, zero the
new slots with memset(3) rather than a for loop.  Particularly of note
for the bit vector where it was bvector_clear()ing one bit at a time.
Although a NULL pointer needn't have a representation of all-zero bits,
the code was already assuming that, e.g. on the initial allocation, so
we're no worse off.


No differences found