[gtk+] Put variable definitions at start of block



commit e10db38f0d82f997850cc890d79140751c6962b3
Author: Shixin Zeng <zeng shixin gmail com>
Date:   Thu Aug 20 23:51:38 2009 +0300

    Put variable definitions at start of block

 gdk-pixbuf/gdk-pixbuf-io.c             |    3 ++-
 modules/engines/ms-windows/msw_style.c |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 664e519..646b0f1 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -277,6 +277,7 @@ correct_prefix (gchar **path)
   if (strncmp (*path, GTK_PREFIX "/", strlen (GTK_PREFIX "/")) == 0 ||
       strncmp (*path, GTK_PREFIX "\\", strlen (GTK_PREFIX "\\")) == 0)
     {
+	  gchar *tem = NULL;
       if (strlen(*path) > 5 && strncmp (*path - 5, ".libs", 5) == 0)
         {
           /* We are being run from inside the build tree, and shouldn't mess about. */
@@ -290,7 +291,7 @@ correct_prefix (gchar **path)
        * builder's machine. Replace the build-time prefix with the
        * installation prefix on this machine.
        */
-      gchar *tem = *path;
+      tem = *path;
       *path = g_strconcat (get_toplevel (), tem + strlen (GTK_PREFIX), NULL);
       g_free (tem);
     }
diff --git a/modules/engines/ms-windows/msw_style.c b/modules/engines/ms-windows/msw_style.c
index bc253e1..a21494b 100755
--- a/modules/engines/ms-windows/msw_style.c
+++ b/modules/engines/ms-windows/msw_style.c
@@ -550,8 +550,8 @@ get_windows_version ()
 
   if (!have_version)
     {
-      have_version = TRUE;
       OSVERSIONINFOEX osvi;
+      have_version = TRUE;
 
       ZeroMemory (&osvi, sizeof (OSVERSIONINFOEX));
       osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]