From: Matthias Clasen Date: Thu, 26 Jan 2006 19:43:48 +0000 (+0000) Subject: Fix C99isms. (#328705, Kazuki Iwamoto) X-Git-Tag: GLIB_2_9_5~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c9179512db272e4d232a4b5c2aebdf344750fcc;p=platform%2Fupstream%2Fglib.git Fix C99isms. (#328705, Kazuki Iwamoto) 2006-01-26 Matthias Clasen * glib/gmem.c (g_mem_init_nomessage): Fix C99isms. (#328705, Kazuki Iwamoto) --- diff --git a/ChangeLog b/ChangeLog index d583e974a..ac8123ae7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-26 Matthias Clasen + + * glib/gmem.c (g_mem_init_nomessage): Fix C99isms. (#328705, + Kazuki Iwamoto) + Wed Jan 25 19:16:57 2006 Tim Janik * fixed buglets reported by Jens Granseuer in #328254. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d583e974a..ac8123ae7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-01-26 Matthias Clasen + + * glib/gmem.c (g_mem_init_nomessage): Fix C99isms. (#328705, + Kazuki Iwamoto) + Wed Jan 25 19:16:57 2006 Tim Janik * fixed buglets reported by Jens Granseuer in #328254. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index d583e974a..ac8123ae7 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2006-01-26 Matthias Clasen + + * glib/gmem.c (g_mem_init_nomessage): Fix C99isms. (#328705, + Kazuki Iwamoto) + Wed Jan 25 19:16:57 2006 Tim Janik * fixed buglets reported by Jens Granseuer in #328254. diff --git a/glib/gmem.c b/glib/gmem.c index 70271de57..002ddd8f5 100644 --- a/glib/gmem.c +++ b/glib/gmem.c @@ -686,15 +686,17 @@ gboolean g_mem_gc_friendly = FALSE; static void g_mem_init_nomessage (void) { - if (g_mem_initialized) - return; - /* don't use g_malloc/g_message here */ gchar buffer[1024]; - const gchar *val = _g_getenv_nomalloc ("G_DEBUG", buffer); + const gchar *val; static const GDebugKey keys[] = { { "gc-friendly", 1 }, }; - gint flags = !val ? 0 : g_parse_debug_string (val, keys, G_N_ELEMENTS (keys)); + gint flags; + if (g_mem_initialized) + return; + /* don't use g_malloc/g_message here */ + val = _g_getenv_nomalloc ("G_DEBUG", buffer); + flags = !val ? 0 : g_parse_debug_string (val, keys, G_N_ELEMENTS (keys)); if (flags & 1) /* gc-friendly */ { g_mem_gc_friendly = TRUE;