X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fpoll.c;h=398d9d7b0582ab38178335fb18f41df5d4b23319;hp=c5dd494b8920317140eb44afbd9f37e52b936e24;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hpb=cc3b9644f017a91d347d7a414387292e3175635e diff --git a/src/common/compat/poll.c b/src/common/compat/poll.c index c5dd494b8..398d9d7b0 100644 --- a/src/common/compat/poll.c +++ b/src/common/compat/poll.c @@ -7,7 +7,6 @@ */ #define _LGPL_SOURCE -#include #include #include @@ -48,7 +47,7 @@ static int resize_poll_event(struct lttng_poll_event *events, { struct epoll_event *ptr; - assert(events); + LTTNG_ASSERT(events); ptr = realloc(events->events, new_size * sizeof(*ptr)); if (ptr == NULL) { @@ -374,7 +373,7 @@ static int resize_poll_event(struct compat_poll_event_array *array, { struct pollfd *ptr; - assert(array); + LTTNG_ASSERT(array); /* Refuse to resize the array more than the max size. */ if (new_size > poll_max_size) { @@ -408,7 +407,7 @@ static int update_current_events(struct lttng_poll_event *events) int ret; struct compat_poll_event_array *current, *wait; - assert(events); + LTTNG_ASSERT(events); current = &events->current; wait = &events->wait; @@ -602,7 +601,7 @@ int compat_poll_del(struct lttng_poll_event *events, int fd) } /* No fd duplicate should be ever added into array. */ - assert(current->nb_fd - 1 == count); + LTTNG_ASSERT(current->nb_fd - 1 == count); current->nb_fd = count; /* Resize array if needed. */