diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-10-14 06:10:14 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-10-14 06:11:19 +0200 |
commit | 71fda00f320379f5cbee8e118848de98caaa229d (patch) | |
tree | 00a913086d70abadb1185e1343d97df860b0d612 /src/login/logind-session.c | |
parent | 14bf2c9d375db6a4670bc0ef0e521e35a939a498 (diff) |
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.
Diffstat (limited to 'src/login/logind-session.c')
-rw-r--r-- | src/login/logind-session.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |