weston-log-flight-rec: Fix useless comparison when displaying the

contents of the flight recorder

The overlap variable is sufficient to determine from where to start
displaying the contents of the ring buffer. Also redundant to verify
if the position in the buffer went over the maximum size.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Marius Vlad 2019-08-07 17:21:49 +03:00 committed by Daniel Stone
parent 0ba0b8e86f
commit d2dbcd3d7e

View file

@ -194,7 +194,7 @@ weston_log_subscriber_display_flight_rec_data(struct weston_ring_buffer *rb,
if (file)
file_d = file;
if (rb->append_pos <= rb->size && !rb->overlap) {
if (!rb->overlap) {
if (rb->append_pos)
fwrite(rb->buf, sizeof(char), rb->append_pos, file_d);
else