summaryrefslogtreecommitdiff
path: root/src/shared/ask-password-api.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-08 19:30:45 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 08:20:20 +0200
commit76ef789d264f9eb7d7624b994aa6eead1dacfac4 (patch)
tree09c25532e8b543fdca5589799dab11f27c0c205b /src/shared/ask-password-api.c
parent3cc2aff1abff9e34f9fec282d970204dc1eab6f1 (diff)
tree-wide: make use of log_error_errno() return value
Turns this: r = -errno; log_error_errno(errno, "foo"); into this: r = log_error_errno(errno, "foo"); and this: r = log_error_errno(errno, "foo"); return r; into this: return log_error_errno(errno, "foo");
Diffstat (limited to 'src/shared/ask-password-api.c')
-rw-r--r--src/shared/ask-password-api.c19
1 files changed, 7 insertions, 12 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;
}