diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-12-19 13:20:30 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-12-19 15:00:59 +0100 |
commit | 3401477982d09e0c9815ae5a69e56f43f187967e (patch) | |
tree | fdf3ce225df76b9e643835928dc29aeef02a51fc /src/import | |
parent | a5937dcf3902ecb90777f259f6e006292eb54251 (diff) | |
download | systemd-3401477982d09e0c9815ae5a69e56f43f187967e.tar.gz |
tree-wide: use -EBADF also in pipe initializers
In some places, initialization is dropped when unnecesary.
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/import-common.c | 4 | ||||
-rw-r--r-- | src/import/importd.c | 2 | ||||
-rw-r--r-- | src/import/pull-common.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/import/import-common.c b/src/import/import-common.c index 3c46aedf61..eb52c6c116 100644 --- a/src/import/import-common.c +++ b/src/import/import-common.c @@ -23,7 +23,7 @@ #include "tmpfile-util.h" int import_fork_tar_x(const char *path, pid_t *ret) { - _cleanup_close_pair_ int pipefd[2] = { -1, -1 }; + _cleanup_close_pair_ int pipefd[2] = { -EBADF, -EBADF }; bool use_selinux; pid_t pid; int r; @@ -96,7 +96,7 @@ int import_fork_tar_x(const char *path, pid_t *ret) { } int import_fork_tar_c(const char *path, pid_t *ret) { - _cleanup_close_pair_ int pipefd[2] = { -1, -1 }; + _cleanup_close_pair_ int pipefd[2] = { -EBADF, -EBADF }; bool use_selinux; pid_t pid; int r; diff --git a/src/import/importd.c b/src/import/importd.c index b2d176b4e7..b6d90cde10 100644 --- a/src/import/importd.c +++ b/src/import/importd.c @@ -356,7 +356,7 @@ static int transfer_on_log(sd_event_source *s, int fd, uint32_t revents, void *u } static int transfer_start(Transfer *t) { - _cleanup_close_pair_ int pipefd[2] = { -1, -1 }; + _cleanup_close_pair_ int pipefd[2] = { -EBADF, -EBADF }; int r; assert(t); diff --git a/src/import/pull-common.c b/src/import/pull-common.c index 7633d3e74b..1c7194fd6b 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -381,7 +381,7 @@ static int verify_gpg( const void *payload, size_t payload_size, const void *signature, size_t signature_size) { - _cleanup_close_pair_ int gpg_pipe[2] = { -1, -1 }; + _cleanup_close_pair_ int gpg_pipe[2] = { -EBADF, -EBADF }; char sig_file_path[] = "/tmp/sigXXXXXX", gpg_home[] = "/tmp/gpghomeXXXXXX"; _cleanup_(sigkill_waitp) pid_t pid = 0; bool gpg_home_created = false; |