summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-08-06 19:03:27 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-10-29 10:18:34 +0100
commitb470c28684495d65b8eaf7733f92990fefe894ba (patch)
treec5f43f1ba8b61cefa23196cf1653ba658b5756b6 /src/login
parent4cb7603a2558061ef4c7d9c693f1c5e1d64e0d5a (diff)
logind: make better use of logging functions
(cherry picked from commit e555d12635007da7263d0a43ed7307e70a07720d)
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-seat.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index b503914cf..4e607739f 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -200,10 +200,8 @@ int seat_preallocate_vts(Seat *s) {
int q;
q = vt_allocate(i);
- if (q < 0) {
- log_error_errno(q, "Failed to preallocate VT %u: %m", i);
- r = q;
- }
+ if (q < 0)
+ r = log_error_errno(q, "Failed to preallocate VT %u: %m", i);
}
return r;
@@ -222,9 +220,9 @@ int seat_apply_acls(Seat *s, Session *old_active) {
!!s->active, s->active ? s->active->user->uid : 0);
if (r < 0)
- log_error_errno(r, "Failed to apply ACLs: %m");
+ return log_error_errno(r, "Failed to apply ACLs: %m");
- return r;
+ return 0;
}
int seat_set_active(Seat *s, Session *session) {