mirror of
https://github.com/swaywm/sway.git
synced 2026-04-27 06:46:25 -04:00
Cleanup list code
This commit is contained in:
parent
19e831ed3d
commit
c8776fac42
11 changed files with 17 additions and 37 deletions
|
|
@ -407,9 +407,8 @@ void swaynag_destroy(struct swaynag *swaynag) {
|
|||
swaynag->run_display = false;
|
||||
|
||||
free(swaynag->message);
|
||||
while (swaynag->buttons->length) {
|
||||
struct swaynag_button *button = swaynag->buttons->items[0];
|
||||
list_del(swaynag->buttons, 0);
|
||||
for (int i = 0; i < swaynag->buttons->length; ++i) {
|
||||
struct swaynag_button *button = swaynag->buttons->items[i];
|
||||
free(button->text);
|
||||
free(button->action);
|
||||
free(button);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue