[lttng-dev] Babeltrace ctf-text duplicated error message

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Apr 3 08:53:56 EDT 2012


* Oestman, Fredrik (Fredrik_Oestman at mentor.com) wrote:
> Hello,
> 
> 
> I've found what appears to be a (very minor) bug in babeltrace, see patch below.

Merged, thanks!

Mathieu

> 
> 
> 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;
>  	}
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list