Fix some C99isms. (#154676, Kjartan Maraas)
authorMatthias Clasen <mclasen@redhat.com>
Wed, 6 Oct 2004 15:05:40 +0000 (15:05 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 6 Oct 2004 15:05:40 +0000 (15:05 +0000)
2004-10-06  Matthias Clasen  <mclasen@redhat.com>

* glib/gfileutils.c: Fix some C99isms.  (#154676, Kjartan Maraas)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gfileutils.c

index 19801fa..988518b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-10-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gfileutils.c: Fix some C99isms.  (#154676, Kjartan Maraas)
+
 2004-10-05  Anders Carlsson  <andersca@gnome.org>
 
        * glib/goption.c: (g_option_context_parse):
index 19801fa..988518b 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gfileutils.c: Fix some C99isms.  (#154676, Kjartan Maraas)
+
 2004-10-05  Anders Carlsson  <andersca@gnome.org>
 
        * glib/goption.c: (g_option_context_parse):
index 19801fa..988518b 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gfileutils.c: Fix some C99isms.  (#154676, Kjartan Maraas)
+
 2004-10-05  Anders Carlsson  <andersca@gnome.org>
 
        * glib/goption.c: (g_option_context_parse):
index 19801fa..988518b 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gfileutils.c: Fix some C99isms.  (#154676, Kjartan Maraas)
+
 2004-10-05  Anders Carlsson  <andersca@gnome.org>
 
        * glib/goption.c: (g_option_context_parse):
index 19801fa..988518b 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gfileutils.c: Fix some C99isms.  (#154676, Kjartan Maraas)
+
 2004-10-05  Anders Carlsson  <andersca@gnome.org>
 
        * glib/goption.c: (g_option_context_parse):
index b2e5a90..da6533e 100644 (file)
@@ -492,9 +492,9 @@ get_contents_regfile (const gchar *filename,
         {
           if (errno != EINTR) 
             {
-              g_free (buf);
              gchar *utf8_filename = g_filename_to_utf8 (filename, -1,
                                                         NULL, NULL, NULL);
+              g_free (buf);
               g_set_error (error,
                            G_FILE_ERROR,
                            g_file_error_from_errno (errno),
@@ -560,10 +560,9 @@ get_contents_posix (const gchar *filename,
   /* I don't think this will ever fail, aside from ENOMEM, but. */
   if (fstat (fd, &stat_buf) < 0)
     {
-      close (fd);
-      
       gchar *utf8_filename = g_filename_to_utf8 (filename, -1,
                                                 NULL, NULL, NULL);
+      close (fd);
       g_set_error (error,
                    G_FILE_ERROR,
                    g_file_error_from_errno (errno),
@@ -1187,10 +1186,9 @@ g_file_read_link (const gchar *filename,
     {
       read_size = readlink (filename, buffer, size);
       if (read_size < 0) {
-       g_free (buffer);
-      
        gchar *utf8_filename = g_filename_to_utf8 (filename, -1,
                                                   NULL, NULL, NULL);
+       g_free (buffer);
        g_set_error (error,
                     G_FILE_ERROR,
                     g_file_error_from_errno (errno),