From a92661f76189fcdf287f75984ed6d492825b0539 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 2 Nov 2002 13:15:10 +0000 Subject: [PATCH] Small cleanup Original commit message from CVS: Small cleanup --- gst/cothreads.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gst/cothreads.c b/gst/cothreads.c index e9439ece67..0dcd165289 100644 --- a/gst/cothreads.c +++ b/gst/cothreads.c @@ -81,16 +81,17 @@ static GPrivate *_cothread_ctx_key; cothread_context * cothread_context_init (void) { - /* - * initalize the whole of the cothreads context - */ cothread_context *ctx; - + /* if there already is a cotread context for this thread, * just return it */ ctx = g_private_get (_cothread_ctx_key); - if(ctx) return ctx; + if (ctx) + return ctx; + /* + * initalize the whole of the cothreads context + */ ctx = (cothread_context *) g_malloc (sizeof (cothread_context)); /* we consider the initiating process to be cothread 0 */