mirror of
https://github.com/swaywm/sway.git
synced 2025-11-25 06:59:48 -05:00
Cleanup list code
This commit is contained in:
parent
19e831ed3d
commit
c8776fac42
11 changed files with 17 additions and 37 deletions
|
|
@ -49,8 +49,7 @@ void free_bar_config(struct bar_config *bar) {
|
|||
free(bar->font);
|
||||
free(bar->separator_symbol);
|
||||
for (int i = 0; i < bar->bindings->length; i++) {
|
||||
struct bar_binding *binding = bar->bindings->items[i];
|
||||
free_bar_binding(binding);
|
||||
free_bar_binding(bar->bindings->items[i]);
|
||||
}
|
||||
list_free(bar->bindings);
|
||||
free_flat_list(bar->outputs);
|
||||
|
|
|
|||
|
|
@ -117,11 +117,8 @@ void free_seat_config(struct seat_config *seat) {
|
|||
|
||||
free(seat->name);
|
||||
for (int i = 0; i < seat->attachments->length; ++i) {
|
||||
struct seat_attachment_config *attachment =
|
||||
seat->attachments->items[i];
|
||||
seat_attachment_config_free(attachment);
|
||||
seat_attachment_config_free(seat->attachments->items[i]);
|
||||
}
|
||||
|
||||
list_free(seat->attachments);
|
||||
free(seat);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue