[sysprof] libsysprof-capture: check frame types when peeking
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof-capture: check frame types when peeking
- Date: Sun, 16 Feb 2020 05:02:42 +0000 (UTC)
commit cb1b7d03fbb1bfb3bfeffbf26535297c27bd5bb6
Author: Christian Hergert <chergert redhat com>
Date: Sat Feb 15 20:49:47 2020 -0700
libsysprof-capture: check frame types when peeking
src/libsysprof-capture/sysprof-capture-reader.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libsysprof-capture/sysprof-capture-reader.c b/src/libsysprof-capture/sysprof-capture-reader.c
index c6c4cc3..888c6e7 100644
--- a/src/libsysprof-capture/sysprof-capture-reader.c
+++ b/src/libsysprof-capture/sysprof-capture-reader.c
@@ -426,7 +426,7 @@ sysprof_capture_reader_peek_frame (SysprofCaptureReader *self,
if (frame->time > self->end_time)
self->end_time = frame->time;
- return TRUE;
+ return frame->type > 0 && frame->type < SYSPROF_CAPTURE_FRAME_LAST;
}
gboolean
@@ -443,7 +443,7 @@ sysprof_capture_reader_peek_type (SysprofCaptureReader *self,
*type = frame.type;
- return TRUE;
+ return frame.type > 0 && frame.type < SYSPROF_CAPTURE_FRAME_LAST;
}
static const SysprofCaptureFrame *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]