summaryrefslogtreecommitdiffstats
path: root/common/list.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-29 19:44:54 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-29 19:44:54 +1000
commitd7169ee7ffd45318125dbe3013aadbd1482a3e5f (patch)
tree33399a07278aa9f624d7fecee5912a9823e33e4d /common/list.c
parentFix crash when moving last child of a container to workspace or output (diff)
downloadsway-d7169ee7ffd45318125dbe3013aadbd1482a3e5f.tar.gz
sway-d7169ee7ffd45318125dbe3013aadbd1482a3e5f.tar.zst
sway-d7169ee7ffd45318125dbe3013aadbd1482a3e5f.zip
Replace list_empty with a simple alternative
Diffstat (limited to 'common/list.c')
-rw-r--r--common/list.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/common/list.c b/common/list.c
index cab10c1e..39cc10e1 100644
--- a/common/list.c
+++ b/common/list.c
@@ -62,13 +62,6 @@ void list_cat(list_t *list, list_t *source) {
62 } 62 }
63} 63}
64 64
65void list_empty(list_t *list) {
66 list->capacity = 10;
67 list->length = 0;
68 free(list->items);
69 list->items = malloc(sizeof(void*) * list->capacity);
70}
71
72void list_qsort(list_t *list, int compare(const void *left, const void *right)) { 65void list_qsort(list_t *list, int compare(const void *left, const void *right)) {
73 qsort(list->items, list->length, sizeof(void *), compare); 66 qsort(list->items, list->length, sizeof(void *), compare);
74} 67}