diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/ask-password-api.c | 19 | ||||
-rw-r--r-- | src/shared/pager.c | 3 |
2 files changed, 8 insertions, 14 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index ca4c24ebde..f5cff6fc56 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -331,8 +331,8 @@ int ask_password_agent( fd = mkostemp_safe(temp, O_WRONLY|O_CLOEXEC); if (fd < 0) { - log_error_errno(errno, "Failed to create password file: %m"); - r = -errno; + r = log_error_errno(errno, + "Failed to create password file: %m"); goto finish; } @@ -340,8 +340,7 @@ int ask_password_agent( f = fdopen(fd, "w"); if (!f) { - log_error_errno(errno, "Failed to allocate FILE: %m"); - r = -errno; + r = log_error_errno(errno, "Failed to allocate FILE: %m"); goto finish; } @@ -349,8 +348,7 @@ int ask_password_agent( signal_fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC); if (signal_fd < 0) { - log_error_errno(errno, "signalfd(): %m"); - r = -errno; + r = log_error_errno(errno, "signalfd(): %m"); goto finish; } @@ -395,8 +393,7 @@ int ask_password_agent( final[sizeof(final)-9] = 'k'; if (rename(temp, final) < 0) { - log_error_errno(errno, "Failed to rename query file: %m"); - r = -errno; + r = log_error_errno(errno, "Failed to rename query file: %m"); goto finish; } @@ -432,8 +429,7 @@ int ask_password_agent( if (errno == EINTR) continue; - log_error_errno(errno, "poll() failed: %m"); - r = -errno; + r = log_error_errno(errno, "poll() failed: %m"); goto finish; } @@ -471,8 +467,7 @@ int ask_password_agent( errno == EINTR) continue; - log_error_errno(errno, "recvmsg() failed: %m"); - r = -errno; + r = log_error_errno(errno, "recvmsg() failed: %m"); goto finish; } diff --git a/src/shared/pager.c b/src/shared/pager.c index 3992f9c837..55fd5cb79e 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -74,8 +74,7 @@ int pager_open(bool jump_to_end) { pager_pid = fork(); if (pager_pid < 0) { - r = -errno; - log_error_errno(errno, "Failed to fork pager: %m"); + r = log_error_errno(errno, "Failed to fork pager: %m"); safe_close_pair(fd); return r; } |