mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-25 21:58:31 +01:00
Merge pull request #3264 from ianyfan/resize-list
list: double list capacity when resizing instead of incrementing
This commit is contained in:
commit
e7efa0e27b
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ list_t *create_list(void) {
|
|||
|
||||
static void list_resize(list_t *list) {
|
||||
if (list->length == list->capacity) {
|
||||
list->capacity += 10;
|
||||
list->capacity *= 2;
|
||||
list->items = realloc(list->items, sizeof(void*) * list->capacity);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue