From: Jonathan Rajotte Date: Tue, 13 Aug 2019 22:50:09 +0000 (-0400) Subject: src.ctf.lttng-live: consider youngest only when timestamp is smaller X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=1d314141f3caff4e68ca9d61186bfa02bc230296 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 --- 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) {