From 71fda00f320379f5cbee8e118848de98caaa229d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 14 Oct 2013 06:10:14 +0200 Subject: list: make our list macros a bit easier to use by not requring type spec on each invocation We can determine the list entry type via the typeof() gcc construct, and so we should to make the macros much shorter to use. --- src/login/logind-session.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/login/logind-session.c') diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 27aa335142..8a021f32a1 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -96,7 +96,7 @@ void session_free(Session *s) { assert(s); if (s->in_gc_queue) - LIST_REMOVE(Session, gc_queue, s->manager->session_gc_queue, s); + LIST_REMOVE(gc_queue, s->manager->session_gc_queue, s); session_drop_controller(s); @@ -106,7 +106,7 @@ void session_free(Session *s) { hashmap_free(s->devices); if (s->user) { - LIST_REMOVE(Session, sessions_by_user, s->user->sessions, s); + LIST_REMOVE(sessions_by_user, s->user->sessions, s); if (s->user->display == s) s->user->display = NULL; @@ -118,7 +118,7 @@ void session_free(Session *s) { if (s->seat->pending_switch == s) s->seat->pending_switch = NULL; - LIST_REMOVE(Session, sessions_by_seat, s->seat->sessions, s); + LIST_REMOVE(sessions_by_seat, s->seat->sessions, s); } if (s->scope) { @@ -149,7 +149,7 @@ void session_set_user(Session *s, User *u) { assert(!s->user); s->user = u; - LIST_PREPEND(Session, sessions_by_user, u->sessions, s); + LIST_PREPEND(sessions_by_user, u->sessions, s); } int session_save(Session *s) { @@ -938,7 +938,7 @@ void session_add_to_gc_queue(Session *s) { if (s->in_gc_queue) return; - LIST_PREPEND(Session, gc_queue, s->manager->session_gc_queue, s); + LIST_PREPEND(gc_queue, s->manager->session_gc_queue, s); s->in_gc_queue = true; } -- cgit v1.2.3-54-g00ecf