chiark / gitweb /
logind: remove spurious include of <sys/capability.h>
[elogind.git] / src / login / logind-session.c
index c1800e085464ed6a28593e56525f5cdc5904f777..ea1831dac692425dddf8299d93a90b0db73357fa 100644 (file)
@@ -967,10 +967,8 @@ static int session_open_vt(Session *s) {
 
         sprintf(path, "/dev/tty%u", s->vtnr);
         s->vtfd = open(path, O_RDWR | O_CLOEXEC | O_NONBLOCK | O_NOCTTY);
-        if (s->vtfd < 0) {
-                log_error_errno(errno, "cannot open VT %s of session %s: %m", path, s->id);
-                return -errno;
-        }
+        if (s->vtfd < 0)
+                return log_error_errno(errno, "cannot open VT %s of session %s: %m", path, s->id);
 
         return s->vtfd;
 }