From: Mathieu Desnoyers Date: Wed, 15 May 2013 14:41:42 +0000 (+0200) Subject: Fix: handle error checking should compare against NULL X-Git-Tag: v1.1.1~11 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=642871ed2665ad09c5660002b678372c1a2006a2 Fix: handle error checking should compare against NULL Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/context.c b/lib/context.c index 209cfde2..dc773668 100644 --- a/lib/context.c +++ b/lib/context.c @@ -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;