mirror of
https://github.com/swaywm/sway.git
synced 2025-11-22 06:59:48 -05:00
Replace list_empty with a simple alternative
This commit is contained in:
parent
e8fb6b3325
commit
d7169ee7ff
3 changed files with 1 additions and 9 deletions
|
|
@ -62,13 +62,6 @@ void list_cat(list_t *list, list_t *source) {
|
|||
}
|
||||
}
|
||||
|
||||
void list_empty(list_t *list) {
|
||||
list->capacity = 10;
|
||||
list->length = 0;
|
||||
free(list->items);
|
||||
list->items = malloc(sizeof(void*) * list->capacity);
|
||||
}
|
||||
|
||||
void list_qsort(list_t *list, int compare(const void *left, const void *right)) {
|
||||
qsort(list->items, list->length, sizeof(void *), compare);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue