From: Matthias Clasen Date: Wed, 6 Oct 2004 15:05:40 +0000 (+0000) Subject: Fix some C99isms. (#154676, Kjartan Maraas) X-Git-Tag: GTK_2_5_4~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01f4ccc859ed00efb1a397886cf14d2f0777b27a;p=platform%2Fupstream%2Fglib.git Fix some C99isms. (#154676, Kjartan Maraas) 2004-10-06 Matthias Clasen * glib/gfileutils.c: Fix some C99isms. (#154676, Kjartan Maraas) --- diff --git a/ChangeLog b/ChangeLog index 19801fa..988518b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-10-06 Matthias Clasen + + * glib/gfileutils.c: Fix some C99isms. (#154676, Kjartan Maraas) + 2004-10-05 Anders Carlsson * glib/goption.c: (g_option_context_parse): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 19801fa..988518b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +2004-10-06 Matthias Clasen + + * glib/gfileutils.c: Fix some C99isms. (#154676, Kjartan Maraas) + 2004-10-05 Anders Carlsson * glib/goption.c: (g_option_context_parse): diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 19801fa..988518b 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,7 @@ +2004-10-06 Matthias Clasen + + * glib/gfileutils.c: Fix some C99isms. (#154676, Kjartan Maraas) + 2004-10-05 Anders Carlsson * glib/goption.c: (g_option_context_parse): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 19801fa..988518b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +2004-10-06 Matthias Clasen + + * glib/gfileutils.c: Fix some C99isms. (#154676, Kjartan Maraas) + 2004-10-05 Anders Carlsson * glib/goption.c: (g_option_context_parse): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 19801fa..988518b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +2004-10-06 Matthias Clasen + + * glib/gfileutils.c: Fix some C99isms. (#154676, Kjartan Maraas) + 2004-10-05 Anders Carlsson * glib/goption.c: (g_option_context_parse): diff --git a/glib/gfileutils.c b/glib/gfileutils.c index b2e5a90..da6533e 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -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),