From 37303c7509bf98243512fbcd54f481e62f215c4b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 8 May 2012 16:02:41 -0400 Subject: [PATCH] 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 --- lttng-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.34.1