X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=94b761cb8fc19fa532b4a485c178b4ac93aaee54;hb=9377d8304c28c29c9ba7b3e7f1ea2551dec8e01a;hp=46f330052aa8c04fdd440b6f4dd30485634678c5;hpb=ba27cd0052c3d29b84b8c157fe5969b6a086f09f;p=lttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 46f330052..94b761cb8 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -1168,7 +1168,7 @@ static int snapshot_channel(struct lttng_consumer_channel *channel, produced_pos, nb_packets_per_stream, stream->max_sb_size); - while (consumed_pos < produced_pos) { + while ((long) (consumed_pos - produced_pos) < 0) { ssize_t read_len; unsigned long len, padded_len;