From 642871ed2665ad09c5660002b678372c1a2006a2 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 15 May 2013 16:41:42 +0200 Subject: [PATCH] Fix: handle error checking should compare against NULL Signed-off-by: Mathieu Desnoyers --- lib/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1