__libc_dynarray_emplace_enlarge: Add missing else

Before, arrays of small elements received a starting allocation size of
8, not 16.

(cherry picked from commit ab5ac271e6)
This commit is contained in:
Florian Weimer 2017-09-06 11:25:14 +02:00
parent 9bb04ec133
commit bf19b5fdcd
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2017-09-06 Florian Weimer <fweimer@redhat.com>
* malloc/dynarray_emplace_enlarge.c
(__libc_dynarray_emplace_enlarge): Add missing else.
2017-08-30 Florian Weimer <fweimer@redhat.com>
* malloc/dynarray_emplace_enlarge.c

View File

@ -33,7 +33,7 @@ __libc_dynarray_emplace_enlarge (struct dynarray_header *list,
size. */
if (element_size < 4)
new_allocated = 16;
if (element_size < 8)
else if (element_size < 8)
new_allocated = 8;
else
new_allocated = 4;