From c8776fac4232f9faab0a78ef3e18dc4366496421 Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Sat, 8 Dec 2018 23:55:14 +0000 Subject: Cleanup list code --- sway/config/bar.c | 3 +-- sway/config/seat.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'sway/config') diff --git a/sway/config/bar.c b/sway/config/bar.c index 82457ef4..fc773026 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c @@ -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); diff --git a/sway/config/seat.c b/sway/config/seat.c index 56fa6095..1cb4c363 100644 --- a/sway/config/seat.c +++ b/sway/config/seat.c @@ -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); } -- cgit v1.2.3