Skip to contentSkip to conversation

Fix: macro compares unsigned to 0 (no effect)

PATCH Jérémie Galarneau 1 participant 1 message May 17, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jérémie Galarneau

author Applied
#1 lore raw

Merged, thanks!

Jérémie

Quoted 26 lines · Mathieu Desnoyers

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.

---
 src/common/compat/compat-epoll.c | 1 -
 1 file changed, 1 deletion(-)
src/common/compat/compat-epoll.c +0 -2
index 58f50cc..6259fd3 100644
@@ -208,7 +208,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.1.4

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev