aboutsummaryrefslogtreecommitdiff
path: root/sway/config
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2018-12-08 23:55:14 +0000
committerIan Fan <ianfan0@gmail.com>2018-12-09 01:15:38 +0000
commitc8776fac4232f9faab0a78ef3e18dc4366496421 (patch)
tree028fbc584d233a7a934feb0b6807c9a988c8e7f1 /sway/config
parent19e831ed3da2aba75d56e46c57967bcc60442d57 (diff)
Cleanup list code
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/bar.c3
-rw-r--r--sway/config/seat.c5
2 files changed, 2 insertions, 6 deletions
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);
}