LTTNG_ASSERT(events);
ptr = (epoll_event *) realloc(events->events, new_size * sizeof(*ptr));
- if (ptr == NULL) {
+ if (ptr == nullptr) {
PERROR("realloc epoll add");
goto error;
}
{
int ret;
- if (events == NULL || count <= 0) {
+ if (events == nullptr || count <= 0) {
goto error;
}
/* This *must* be freed by using lttng_poll_free() */
events->events = calloc<epoll_event>(count);
- if (events->events == NULL) {
+ if (events->events == nullptr) {
PERROR("zmalloc epoll set");
goto error_close;
}
int ret;
struct epoll_event ev;
- if (events == NULL || events->events == NULL || fd < 0) {
+ if (events == nullptr || events->events == nullptr || fd < 0) {
ERR("Bad compat epoll add arguments");
goto error;
}
{
int ret;
- if (events == NULL || fd < 0 || events->nb_fd == 0) {
+ if (events == nullptr || fd < 0 || events->nb_fd == 0) {
goto error;
}
- ret = epoll_ctl(events->epfd, EPOLL_CTL_DEL, fd, NULL);
+ ret = epoll_ctl(events->epfd, EPOLL_CTL_DEL, fd, nullptr);
if (ret < 0) {
switch (errno) {
case ENOENT:
int ret;
struct epoll_event ev;
- if (events == NULL || fd < 0 || events->nb_fd == 0) {
+ if (events == nullptr || fd < 0 || events->nb_fd == 0) {
goto error;
}
int ret;
uint32_t new_size;
- if (events == NULL || events->events == NULL) {
+ if (events == nullptr || events->events == nullptr) {
ERR("Wrong arguments in compat_epoll_wait");
goto error;
}
/*
* Setup poll set maximum size.
*/
-int compat_epoll_set_max_size(void)
+int compat_epoll_set_max_size()
{
int ret, fd, retval = 0;
ssize_t size_ret;