[lttng-dev] Babeltrace ctf-text duplicated error message
Oestman, Fredrik
Fredrik_Oestman at mentor.com
Tue Apr 3 06:55:12 EDT 2012
Hello,
I've found what appears to be a (very minor) bug in babeltrace, see patch below.
Cheers,
Fredrik Östman
diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c
index 273c9b7..fa0cb4d 100644
--- a/formats/ctf-text/ctf-text.c
+++ b/formats/ctf-text/ctf-text.c
@@ -236,8 +236,8 @@ int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream *stream)
return -EINVAL;
}
event_class = g_ptr_array_index(stream_class->events_by_id, id);
- if (!event) {
- fprintf(stderr, "[error] Event id %" PRIu64 " is unknown.\n", id);
+ if (!event_class) {
+ fprintf(stderr, "[error] Event class id %" PRIu64 " is unknown.\n", id);
return -EINVAL;
}
More information about the lttng-dev
mailing list