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.0.3~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1b2bed5769a130f8128660735c17d93603eb7489;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 2fedbea5..8af92d07 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