summaryrefslogtreecommitdiff
path: root/src/user-sessions/user-sessions.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-09-09 09:57:29 +0200
committerDaniel Mack <github@zonque.org>2015-09-09 09:57:29 +0200
commit0fa7d1f5be847d4804eb3bf6a4c10333ea14e0bc (patch)
tree6afb70cc560bd94219f81495ff699c83b404e18c /src/user-sessions/user-sessions.c
parentbed2c013b6570908a114a337632000cf9c9de838 (diff)
parentece174c5439021e32ebcc858842de9586072c006 (diff)
Merge pull request #1207 from poettering/coccinelle-fixes
Coccinelle fixes
Diffstat (limited to 'src/user-sessions/user-sessions.c')
-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