]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: make better use of logging functions
authorLennart Poettering <lennart@poettering.net>
Mon, 6 Aug 2018 17:03:27 +0000 (19:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 13 Oct 2018 10:59:29 +0000 (12:59 +0200)
src/login/logind-seat.c

index 824bef02a26c49ea73c4a93ec387e73f0cae49ca..d67ff116e41a6b59d937f3044b0f2a017ab7b42f 100644 (file)
@@ -199,10 +199,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;
@@ -219,9 +217,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) {