From 5cb6809197b4e8cac4d7649081388e33bedaebbf Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 17 May 2016 09:01:51 -0400 Subject: [PATCH 1/1] Fix: macro compares unsigned to 0 (no effect) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/common/compat/compat-epoll.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/common/compat/compat-epoll.c b/src/common/compat/compat-epoll.c index 614f166ff..cf9f77102 100644 --- a/src/common/compat/compat-epoll.c +++ b/src/common/compat/compat-epoll.c @@ -209,7 +209,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; -- 2.34.1