src.ctf.lttng-live: consider youngest only when timestamp is smaller
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 13 Aug 2019 22:50:09 +0000 (18:50 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 14 Aug 2019 22:00:26 +0000 (18:00 -0400)
When the timestamps are equals perform further comparison.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: Id7567019177ab2e2d4ad1ab1e8840aa07f9ba471
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1913
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/ctf/lttng-live/lttng-live.c

index 0baa163f822ebec7369150bcf4d1cec2098bb32a..1962aa2de3e4fdd9a25ac88bd1208a21d2fd4fc0 100644 (file)
@@ -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) {
This page took 0.025021 seconds and 4 git commands to generate.