aboutsummaryrefslogtreecommitdiff
path: root/malloc/dynarray_emplace_enlarge.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-09-06 11:25:14 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-09-06 16:03:28 +0200
commitab5ac271e6210fa0af11cf3ca525ce573bc47c48 (patch)
treec8dcd6ff3bd96dc70b0b8f43def43404569f4d0a /malloc/dynarray_emplace_enlarge.c
parenta83047308196e3e54716a39dd85c0a08b198d6bd (diff)
downloadglibc-ab5ac271e6210fa0af11cf3ca525ce573bc47c48.zip
glibc-ab5ac271e6210fa0af11cf3ca525ce573bc47c48.tar.gz
glibc-ab5ac271e6210fa0af11cf3ca525ce573bc47c48.tar.bz2
__libc_dynarray_emplace_enlarge: Add missing else
Before, arrays of small elements received a starting allocation size of 8, not 16.
Diffstat (limited to 'malloc/dynarray_emplace_enlarge.c')
-rw-r--r--malloc/dynarray_emplace_enlarge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/dynarray_emplace_enlarge.c b/malloc/dynarray_emplace_enlarge.c
index 0fb0327..a15245f 100644
--- a/malloc/dynarray_emplace_enlarge.c
+++ b/malloc/dynarray_emplace_enlarge.c
@@ -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;