X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fcontext.c;h=56ac320e393e037dc0720826dd06dee519b7d070;hb=61ddbc8a7d5e9701368c2aa3713b928580e1789e;hp=3617bcd61447775ebb1313b030f59e7c1249d282;hpb=61cf588beae752e5ddfc60b6b5310f769ac9e852;p=babeltrace.git 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; }