From: Mathieu Desnoyers Date: Tue, 8 May 2012 20:02:41 +0000 (-0400) Subject: Fix: free_event_id check should compare unsigned int with -1U X-Git-Tag: v2.1.0-rc1~24 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=37303c7509bf98243512fbcd54f481e62f215c4b;p=lttng-modules.git Fix: free_event_id check should compare unsigned int with -1U Otherwise, on 32-bit: lttng-modules/lttng-events.c:295: warning: comparison is always false due to limited range of data type Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-events.c b/lttng-events.c index 9d933935..bbff1c9d 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -292,7 +292,7 @@ struct lttng_event *lttng_event_create(struct lttng_channel *chan, int ret; mutex_lock(&sessions_mutex); - if (chan->free_event_id == -1UL) + if (chan->free_event_id == -1U) goto full; /* * This is O(n^2) (for each event, the loop is called at event