diff options
Diffstat (limited to '')
-rw-r--r-- | src/basic/chase-symlinks.c | 2 | ||||
-rw-r--r-- | src/boot/bootctl-status.c | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 2 | ||||
-rw-r--r-- | src/shared/loop-util.c | 2 | ||||
-rw-r--r-- | src/test/test-mempress.c | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/basic/chase-symlinks.c b/src/basic/chase-symlinks.c index 3a4fdcd1e0..7cbe0b45ae 100644 --- a/src/basic/chase-symlinks.c +++ b/src/basic/chase-symlinks.c @@ -705,7 +705,7 @@ int chase_symlinks_and_unlink( char **ret_path) { _cleanup_free_ char *p = NULL, *rp = NULL, *dir = NULL, *fname = NULL; - _cleanup_close_ int fd = -1; + _cleanup_close_ int fd = -EBADF; int r; assert(path); diff --git a/src/boot/bootctl-status.c b/src/boot/bootctl-status.c index 8586e64480..1b17712a90 100644 --- a/src/boot/bootctl-status.c +++ b/src/boot/bootctl-status.c @@ -718,7 +718,7 @@ static int cleanup_orphaned_files( _cleanup_(hashmap_free_free_keyp) Hashmap *known_files = NULL; _cleanup_free_ char *full = NULL, *p = NULL; - _cleanup_close_ int dir_fd = -1; + _cleanup_close_ int dir_fd = -EBADF; int r = -1; assert(config); diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 46292da2a1..73b5267ae8 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1915,7 +1915,7 @@ _public_ int sd_event_add_memory_pressure( _cleanup_free_ char *w = NULL; _cleanup_(source_freep) sd_event_source *s = NULL; - _cleanup_close_ int path_fd = -1, fd = -1; + _cleanup_close_ int path_fd = -EBADF, fd = -EBADF; _cleanup_free_ void *write_buffer = NULL; const char *watch, *watch_fallback = NULL, *env; size_t write_buffer_size = 0; diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c index 049ec21ab9..6e187efe94 100644 --- a/src/shared/loop-util.c +++ b/src/shared/loop-util.c @@ -504,7 +504,7 @@ static int loop_device_make_internal( * the underlying block device. */ r = blockdev_get_sector_size(fd, §or_size); else { - _cleanup_close_ int non_direct_io_fd = -1; + _cleanup_close_ int non_direct_io_fd = -EBADF; int probe_fd; assert(S_ISREG(st.st_mode)); diff --git a/src/test/test-mempress.c b/src/test/test-mempress.c index 3371965ac3..510c732715 100644 --- a/src/test/test-mempress.c +++ b/src/test/test-mempress.c @@ -28,7 +28,7 @@ struct fake_pressure_context { static void *fake_pressure_thread(void *p) { _cleanup_free_ struct fake_pressure_context *c = ASSERT_PTR(p); - _cleanup_close_ int cfd = -1; + _cleanup_close_ int cfd = -EBADF; usleep(150); @@ -68,7 +68,7 @@ TEST(fake_pressure) { _cleanup_(sd_event_unrefp) sd_event *e = NULL; _cleanup_free_ char *j = NULL, *k = NULL; _cleanup_(rm_rf_physical_and_freep) char *tmp = NULL; - _cleanup_close_ int fifo_fd = -1, socket_fd = -1; + _cleanup_close_ int fifo_fd = -EBADF, socket_fd = -EBADF; union sockaddr_union sa; pthread_t th; int value = 7; |