aboutsummaryrefslogtreecommitdiff
path: root/sway/config
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-12-09 21:50:19 +1000
committerGitHub <noreply@github.com>2018-12-09 21:50:19 +1000
commitb61a936c8060bc4ac4320a5f76fd98b5042e5e41 (patch)
tree279a5554686d6e862282c943bda50787b69711e1 /sway/config
parente7efa0e27b7bf44217d7f147281d463708d2dfc9 (diff)
parent98c1e19466c0d83c8e1ca86eda5b273eda7eff3c (diff)
downloadsway-b61a936c8060bc4ac4320a5f76fd98b5042e5e41.tar.xz
Merge pull request #3271 from ianyfan/list-cleanup
list.c: Remove list_foreach
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/bar.c7
-rw-r--r--sway/config/seat.c5
2 files changed, 3 insertions, 9 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c
index 36e10527..45c9e998 100644
--- a/sway/config/bar.c
+++ b/sway/config/bar.c
@@ -49,13 +49,10 @@ 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);
- if (bar->outputs) {
- free_flat_list(bar->outputs);
- }
+ list_free_items_and_destroy(bar->outputs);
if (bar->pid != 0) {
terminate_swaybar(bar->pid);
}
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);
}