Make libseat_seat_listener const

libseat will never write to that struct. Let's allow callers to
make it read-only.
This commit is contained in:
Simon Ser 2021-08-14 09:03:23 +00:00 committed by Kenny Levinsen
parent 309650aa4d
commit 166feaea33
6 changed files with 10 additions and 10 deletions

View file

@ -30,7 +30,7 @@
struct backend_logind {
struct libseat base;
struct libseat_seat_listener *seat_listener;
const struct libseat_seat_listener *seat_listener;
void *seat_listener_data;
sd_bus *bus;
@ -621,7 +621,7 @@ static int set_type(struct backend_logind *backend, const char *type) {
return ret;
}
static struct libseat *logind_open_seat(struct libseat_seat_listener *listener, void *data) {
static struct libseat *logind_open_seat(const struct libseat_seat_listener *listener, void *data) {
struct backend_logind *backend = calloc(1, sizeof(struct backend_logind));
if (backend == NULL) {
return NULL;