sd_event *e = NULL;
sd_event_source *w = NULL, *x = NULL, *y = NULL, *z = NULL, *q = NULL, *t = NULL;
static const char ch = 'x';
- int a[2] = { -1, -1 }, b[2] = { -1, -1}, d[2] = { -1, -1}, k[2] = { -1, -1 };
+ int a[2] = { -EBADF, -EBADF }, b[2] = { -EBADF, -EBADF },
+ d[2] = { -EBADF, -EBADF }, k[2] = { -EBADF, -EBADF };
uint64_t event_now;
int64_t priority;
got_a = false, got_b = false, got_c = false, got_d = 0;
- /* Add a oneshot handler, trigger it, reenable it, and trigger
- * it again. */
+ /* Add a oneshot handler, trigger it, reenable it, and trigger it again. */
assert_se(sd_event_add_io(e, &w, d[0], EPOLLIN, io_handler, INT_TO_PTR('d')) >= 0);
assert_se(sd_event_source_set_enabled(w, SD_EVENT_ONESHOT) >= 0);
assert_se(write(d[1], &ch, 1) >= 0);
_cleanup_(sd_event_source_unrefp) sd_event_source *s = NULL;
_cleanup_(sd_event_unrefp) sd_event *e = NULL;
char path[] = "/tmp/inotifyXXXXXX";
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
/* Tests that destroying an inotify event source from its own handler is safe */