X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fcontext.c;h=dc7736689170e10da3ba1164f543c79e334fdbe3;hb=c309df1c8522c61ea9f4f108fa2d1eee3a828037;hp=18e2e22c7891011229412e613b93828eccf1c904;hpb=1cf393f63db4dce618515749d5549564d1313ee4;p=babeltrace.git diff --git a/lib/context.c b/lib/context.c index 18e2e22c..dc773668 100644 --- a/lib/context.c +++ b/lib/context.c @@ -69,11 +69,11 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path, const char *format_name, void (*packet_seek)(struct bt_stream_pos *pos, size_t index, int whence), - struct mmap_stream_list *stream_list, + struct bt_mmap_stream_list *stream_list, FILE *metadata) { - struct trace_descriptor *td; - struct format *fmt; + struct bt_trace_descriptor *td; + struct bt_format *fmt; struct bt_trace_handle *handle; int ret, closeret; @@ -107,7 +107,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path, /* Create an handle for the trace */ handle = bt_trace_handle_create(ctx); - if (handle < 0) { + if (!handle) { fprintf(stderr, "[error] [Context] Creating trace handle %s .\n\n", path); ret = -1;