From 27b50b6d439a3e3a302d848d4dadfe3b37a5aa7f Mon Sep 17 00:00:00 2001 From: Morten Welinder Date: Wed, 9 Jul 2003 19:32:16 +0000 Subject: [PATCH] Avoid var declaration after statement. 2003-07-09 Morten Welinder * glib/gprintf.c (g_vasprintf): Avoid var declaration after statement. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/gprintf.c | 12 +++++++----- 7 files changed, 37 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32a940ad1..b031509b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-07-09 Morten Welinder + + * glib/gprintf.c (g_vasprintf): Avoid var declaration after + statement. + 2003-07-09 Matthias Clasen Support for one-time initialization functions. (#69668, Sebastian Wilhelmi) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 32a940ad1..b031509b9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2003-07-09 Morten Welinder + + * glib/gprintf.c (g_vasprintf): Avoid var declaration after + statement. + 2003-07-09 Matthias Clasen Support for one-time initialization functions. (#69668, Sebastian Wilhelmi) diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 32a940ad1..b031509b9 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2003-07-09 Morten Welinder + + * glib/gprintf.c (g_vasprintf): Avoid var declaration after + statement. + 2003-07-09 Matthias Clasen Support for one-time initialization functions. (#69668, Sebastian Wilhelmi) diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 32a940ad1..b031509b9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2003-07-09 Morten Welinder + + * glib/gprintf.c (g_vasprintf): Avoid var declaration after + statement. + 2003-07-09 Matthias Clasen Support for one-time initialization functions. (#69668, Sebastian Wilhelmi) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 32a940ad1..b031509b9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2003-07-09 Morten Welinder + + * glib/gprintf.c (g_vasprintf): Avoid var declaration after + statement. + 2003-07-09 Matthias Clasen Support for one-time initialization functions. (#69668, Sebastian Wilhelmi) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 32a940ad1..b031509b9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2003-07-09 Morten Welinder + + * glib/gprintf.c (g_vasprintf): Avoid var declaration after + statement. + 2003-07-09 Matthias Clasen Support for one-time initialization functions. (#69668, Sebastian Wilhelmi) diff --git a/glib/gprintf.c b/glib/gprintf.c index 03d8a076a..209abf6cd 100644 --- a/glib/gprintf.c +++ b/glib/gprintf.c @@ -302,14 +302,16 @@ g_vasprintf (gchar **string, *string = string1; } #else - va_list args2; + { + va_list args2; - G_VA_COPY (args2, args); + G_VA_COPY (args2, args); - *string = g_new (gchar, g_printf_string_upper_bound (format, args)); + *string = g_new (gchar, g_printf_string_upper_bound (format, args)); - len = _g_vsprintf (*string, format, args2); - va_end (args2); + len = _g_vsprintf (*string, format, args2); + va_end (args2); + } #endif return len;