aboutsummaryrefslogtreecommitdiff
path: root/seatd/client.c
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-03 02:12:47 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-03 02:16:21 +0200
commit9b7a12d90aa914db859044d0fd96369d7b9340c9 (patch)
treedb6ea054dc1470106f7d43e59d8cfaef5d089706 /seatd/client.c
parent4afe674e54a1df7a86d3094d664cc2d1928f3662 (diff)
seat: Convert device list to linked list
Diffstat (limited to 'seatd/client.c')
-rw-r--r--seatd/client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/seatd/client.c b/seatd/client.c
index 5ec80ae..ed018db 100644
--- a/seatd/client.c
+++ b/seatd/client.c
@@ -15,6 +15,7 @@
#endif
#include "client.h"
+#include "linked_list.h"
#include "log.h"
#include "poller.h"
#include "protocol.h"
@@ -67,7 +68,7 @@ struct client *client_create(struct server *server, int client_fd) {
client->pid = pid;
client->server = server;
client->connection.fd = client_fd;
- list_init(&client->devices);
+ linked_list_init(&client->devices);
return client;
}
@@ -102,8 +103,7 @@ void client_destroy(struct client *client) {
client->connection.fd = -1;
}
connection_close_fds(&client->connection);
- assert(client->devices.length == 0);
- list_free(&client->devices);
+ assert(linked_list_empty(&client->devices));
free(client);
}