From 1d314141f3caff4e68ca9d61186bfa02bc230296 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 13 Aug 2019 18:50:09 -0400 Subject: [PATCH] src.ctf.lttng-live: consider youngest only when timestamp is smaller When the timestamps are equals perform further comparison. Signed-off-by: Jonathan Rajotte Change-Id: Id7567019177ab2e2d4ad1ab1e8840aa07f9ba471 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1913 CI-Build: Philippe Proulx Tested-by: jenkins Reviewed-by: Philippe Proulx --- src/plugins/ctf/lttng-live/lttng-live.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/ctf/lttng-live/lttng-live.c b/src/plugins/ctf/lttng-live/lttng-live.c index 0baa163f..1962aa2d 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.c +++ b/src/plugins/ctf/lttng-live/lttng-live.c @@ -1343,7 +1343,7 @@ bt_component_class_message_iterator_next_method_status lttng_live_msg_iter_next( } if (G_UNLIKELY(youngest_stream_iter == NULL) || - candidate_stream_iter->current_msg_ts_ns <= youngest_msg_ts_ns) { + candidate_stream_iter->current_msg_ts_ns < youngest_msg_ts_ns) { youngest_msg_ts_ns = candidate_stream_iter->current_msg_ts_ns; youngest_stream_iter = candidate_stream_iter; } else if (candidate_stream_iter->current_msg_ts_ns == youngest_msg_ts_ns) { -- 2.34.1