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);
_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);
_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;
* 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));
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);
_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;