From: Mathieu Desnoyers Date: Tue, 17 May 2016 13:01:51 +0000 (-0400) Subject: Fix: macro compares unsigned to 0 (no effect) X-Git-Tag: v2.7.3~43 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=333a5eb0a82b98604c1d26ef7e0b9ee6f8c29162;p=lttng-tools.git Fix: macro compares unsigned to 0 (no effect) Found by Coverity: CID 1262117 (#1 of 1): Macro compares unsigned to 0 (NO_EFFECT)unsigned_compare: This greater-than-or-equal-to-zero comparison of an unsigned value is always true. events->nb_fd >= 0U. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/compat/compat-epoll.c b/src/common/compat/compat-epoll.c index 5d6153b64..c397c1f49 100644 --- a/src/common/compat/compat-epoll.c +++ b/src/common/compat/compat-epoll.c @@ -210,7 +210,6 @@ int compat_epoll_wait(struct lttng_poll_event *events, int timeout) ERR("Wrong arguments in compat_epoll_wait"); goto error; } - assert(events->nb_fd >= 0); if (events->nb_fd == 0) { errno = EINVAL;