Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: Fredrik_Oestman@mentor.com (Oestman, Fredrik)
Subject: [lttng-dev] Babeltrace ctf-text duplicated error message
Date: Tue, 3 Apr 2012 10:55:12 +0000	[thread overview]
Message-ID: <524C960C5DFC794E82BE548D825F05CF29D8A8@EU-MBX-04.mgc.mentorg.com> (raw)

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;
 	}




             reply	other threads:[~2012-04-03 10:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 10:55 Oestman, Fredrik [this message]
2012-04-03 11:35 ` [lttng-dev] Writing a babeltrace output plugin Oestman, Fredrik
2012-04-03 12:57   ` Mathieu Desnoyers
2012-04-03 13:31     ` Oestman, Fredrik
2012-04-03 13:33       ` Mathieu Desnoyers
2012-04-03 13:34         ` Mathieu Desnoyers
2012-04-03 14:06           ` Oestman, Fredrik
2012-04-03 14:10             ` Mathieu Desnoyers
2012-04-03 14:21               ` Julien Desfossez
2012-04-04  7:00                 ` Oestman, Fredrik
2012-04-17  6:57     ` Oestman, Fredrik
2012-04-17 15:05       ` Mathieu Desnoyers
2012-04-17 15:30         ` Alexandre Montplaisir
2012-04-17 15:44           ` Matthew Khouzam
2012-04-17 15:48           ` Mathieu Desnoyers
2012-04-03 12:53 ` [lttng-dev] Babeltrace ctf-text duplicated error message Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524C960C5DFC794E82BE548D825F05CF29D8A8@EU-MBX-04.mgc.mentorg.com \
    --to=fredrik_oestman@mentor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox