summaryrefslogtreecommitdiff
path: root/src/user-sessions
diff options
context:
space:
mode:
Diffstat (limited to 'src/user-sessions')
-rw-r--r--src/user-sessions/user-sessions.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/user-sessions/user-sessions.c b/src/user-sessions/user-sessions.c
index e80a7771de..7c736c44d2 100644
--- a/src/user-sessions/user-sessions.c
+++ b/src/user-sessions/user-sessions.c
@@ -42,10 +42,9 @@ int main(int argc, char*argv[]) {
if (streq(argv[1], "start")) {
int r = 0;
- if (unlink("/run/nologin") < 0 && errno != ENOENT) {
- log_error_errno(errno, "Failed to remove /run/nologin file: %m");
- r = -errno;
- }
+ if (unlink("/run/nologin") < 0 && errno != ENOENT)
+ r = log_error_errno(errno,
+ "Failed to remove /run/nologin file: %m");
if (unlink("/etc/nologin") < 0 && errno != ENOENT) {
/* If the file doesn't exist and /etc simply