]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
__libc_dynarray_emplace_enlarge: Add missing else
authorFlorian Weimer <fweimer@redhat.com>
Wed, 6 Sep 2017 09:25:14 +0000 (11:25 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 6 Sep 2017 14:09:05 +0000 (16:09 +0200)
Before, arrays of small elements received a starting allocation size of
8, not 16.

ChangeLog
malloc/dynarray_emplace_enlarge.c

index e98a4bbf3c18fa48e2da190848974813e51ea886..f82fd1f97defa273bafc1eebea539b8c82cc58d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        [BZ #22096]
index dfc70017cec238000d67cc643b9d54907c8a4056..09cd09268b25a6caafcbaca1aaeb8d7ebee2afd3 100644 (file)
@@ -32,7 +32,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;