From 3401477982d09e0c9815ae5a69e56f43f187967e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 19 Dec 2022 13:20:30 +0100 Subject: tree-wide: use -EBADF also in pipe initializers In some places, initialization is dropped when unnecesary. --- src/portable/portable.c | 2 +- src/portable/portabled-image-bus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/portable') 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; -- cgit v1.2.1