summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-12-19 13:20:30 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-12-19 15:00:59 +0100
commit3401477982d09e0c9815ae5a69e56f43f187967e (patch)
treefdf3ce225df76b9e643835928dc29aeef02a51fc /src/portable
parenta5937dcf3902ecb90777f259f6e006292eb54251 (diff)
downloadsystemd-3401477982d09e0c9815ae5a69e56f43f187967e.tar.gz
tree-wide: use -EBADF also in pipe initializers
In some places, initialization is dropped when unnecesary.
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/portable.c2
-rw-r--r--src/portable/portabled-image-bus.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/portable/portable.c b/src/portable/portable.c
index 45dd70b13d..28d9ccd302 100644
--- a/src/portable/portable.c
+++ b/src/portable/portable.c
@@ -355,7 +355,7 @@ static int portable_extract_by_path(
else {
_cleanup_(dissected_image_unrefp) DissectedImage *m = NULL;
_cleanup_(rmdir_and_freep) char *tmpdir = NULL;
- _cleanup_(close_pairp) int seq[2] = { -1, -1 };
+ _cleanup_(close_pairp) int seq[2] = { -EBADF, -EBADF };
_cleanup_(sigkill_waitp) pid_t child = 0;
/* We now have a loopback block device, let's fork off a child in its own mount namespace, mount it
diff --git a/src/portable/portabled-image-bus.c b/src/portable/portabled-image-bus.c
index 704b51d81d..f0eb71b710 100644
--- a/src/portable/portabled-image-bus.c
+++ b/src/portable/portabled-image-bus.c
@@ -486,7 +486,7 @@ int bus_image_common_remove(
Image *image,
sd_bus_error *error) {
- _cleanup_close_pair_ int errno_pipe_fd[2] = { -1, -1 };
+ _cleanup_close_pair_ int errno_pipe_fd[2] = { -EBADF, -EBADF };
_cleanup_(sigkill_waitp) pid_t child = 0;
PortableState state;
int r;