tree-wide: use -EBADF more

This commit is contained in:
Yu Watanabe
2022-12-21 01:50:33 +09:00
parent 19ee48a6c2
commit 5bb1d7fbab
41 changed files with 65 additions and 65 deletions
+2 -2
View File
@@ -395,7 +395,7 @@ static int verify_gpg(
return log_error_errno(errno, "Failed to create pipe for gpg: %m");
if (signature_size > 0) {
_cleanup_close_ int sig_file = -1;
_cleanup_close_ int sig_file = -EBADF;
sig_file = mkostemp(sig_file_path, O_RDWR);
if (sig_file < 0)
@@ -440,7 +440,7 @@ static int verify_gpg(
gpg_pipe[1] = safe_close(gpg_pipe[1]);
r = rearrange_stdio(TAKE_FD(gpg_pipe[0]), -1, STDERR_FILENO);
r = rearrange_stdio(TAKE_FD(gpg_pipe[0]), -EBADF, STDERR_FILENO);
if (r < 0) {
log_error_errno(r, "Failed to rearrange stdin/stdout: %m");
_exit(EXIT_FAILURE);