diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-06 16:48:17 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-06 16:54:00 +0300 |
commit | 491ac9f2c4aeda8c40edde35112404b737e38b60 (patch) | |
tree | 55a5dded7bd23a9e079a92de97c3c7628494b3a3 /src/login/logind-session.c | |
parent | 65d73cf042ba7de11d254f5c4714f467db64b7c3 (diff) |
logind,machined: various smaller cleanups
Use mfree() where we can.
Drop unnecessary {}.
Drop unnecessary variable declarations.
Cast syscall invocations where explicitly don't care for the return
value to (void).
Reword a comment.
Diffstat (limited to 'src/login/logind-session.c')
-rw-r--r-- | src/login/logind-session.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c index fc92f7f73b..e75c7c042e 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -656,7 +656,6 @@ int session_stop(Session *s, bool force) { } int session_finalize(Session *s) { - int r = 0; SessionDevice *sd; assert(s); @@ -682,7 +681,7 @@ int session_finalize(Session *s) { while ((sd = hashmap_first(s->devices))) session_device_free(sd); - unlink(s->state_file); + (void) unlink(s->state_file); session_add_to_gc_queue(s); user_add_to_gc_queue(s->user); @@ -702,7 +701,7 @@ int session_finalize(Session *s) { user_save(s->user); user_send_changed(s->user, "Sessions", "Display", NULL); - return r; + return 0; } static int release_timeout_callback(sd_event_source *es, uint64_t usec, void *userdata) { |