mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +00:00
__libc_dynarray_emplace_enlarge: Add missing else
Before, arrays of small elements received a starting allocation size of 8, not 16.
This commit is contained in:
parent
27233446a6
commit
d265b61291
@ -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-09-06 Florian Weimer <fweimer@redhat.com>
|
2017-09-06 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
[BZ #22096]
|
[BZ #22096]
|
||||||
|
@ -32,7 +32,7 @@ __libc_dynarray_emplace_enlarge (struct dynarray_header *list,
|
|||||||
size. */
|
size. */
|
||||||
if (element_size < 4)
|
if (element_size < 4)
|
||||||
new_allocated = 16;
|
new_allocated = 16;
|
||||||
if (element_size < 8)
|
else if (element_size < 8)
|
||||||
new_allocated = 8;
|
new_allocated = 8;
|
||||||
else
|
else
|
||||||
new_allocated = 4;
|
new_allocated = 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user