X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=lib%2Fcontext.c;fp=lib%2Fcontext.c;h=56ac320e393e037dc0720826dd06dee519b7d070;hp=3617bcd61447775ebb1313b030f59e7c1249d282;hb=5b44aff250d4510f7e96447ddc77f0e3ff3f1739;hpb=b04abc0d33636acfb49feaf77284915eb500a885 diff --git a/lib/context.c b/lib/context.c index 3617bcd6..56ac320e 100644 --- a/lib/context.c +++ b/lib/context.c @@ -174,7 +174,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path, /* Add new handle to container */ g_hash_table_insert(ctx->trace_handles, - (gpointer) (unsigned long) handle->id, + GUINT_TO_POINTER(handle->id), handle); return handle->id; @@ -207,7 +207,7 @@ int bt_context_remove_trace(struct bt_context *ctx, int handle_id) * automatically. */ if (!g_hash_table_remove(ctx->trace_handles, - (gpointer) (unsigned long) handle_id)) { + GUINT_TO_POINTER(handle_id))) { ret = -ENOENT; goto end; }