Fix some C99isms. (#154676, Kjartan Maraas)

2004-10-06  Matthias Clasen  <mclasen@redhat.com>

	* glib/gfileutils.c: Fix some C99isms.  (#154676, Kjartan Maraas)
This commit is contained in:
Matthias Clasen 2004-10-06 15:05:40 +00:00 committed by Matthias Clasen
parent 565d9253e7
commit 01f4ccc859
6 changed files with 23 additions and 5 deletions

View 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> 2004-10-05 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (g_option_context_parse): * glib/goption.c: (g_option_context_parse):

View 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> 2004-10-05 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (g_option_context_parse): * glib/goption.c: (g_option_context_parse):

View 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> 2004-10-05 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (g_option_context_parse): * glib/goption.c: (g_option_context_parse):

View 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> 2004-10-05 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (g_option_context_parse): * glib/goption.c: (g_option_context_parse):

View 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> 2004-10-05 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (g_option_context_parse): * glib/goption.c: (g_option_context_parse):

View File

@ -492,9 +492,9 @@ get_contents_regfile (const gchar *filename,
{ {
if (errno != EINTR) if (errno != EINTR)
{ {
g_free (buf);
gchar *utf8_filename = g_filename_to_utf8 (filename, -1, gchar *utf8_filename = g_filename_to_utf8 (filename, -1,
NULL, NULL, NULL); NULL, NULL, NULL);
g_free (buf);
g_set_error (error, g_set_error (error,
G_FILE_ERROR, G_FILE_ERROR,
g_file_error_from_errno (errno), 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. */ /* I don't think this will ever fail, aside from ENOMEM, but. */
if (fstat (fd, &stat_buf) < 0) if (fstat (fd, &stat_buf) < 0)
{ {
close (fd);
gchar *utf8_filename = g_filename_to_utf8 (filename, -1, gchar *utf8_filename = g_filename_to_utf8 (filename, -1,
NULL, NULL, NULL); NULL, NULL, NULL);
close (fd);
g_set_error (error, g_set_error (error,
G_FILE_ERROR, G_FILE_ERROR,
g_file_error_from_errno (errno), g_file_error_from_errno (errno),
@ -1187,10 +1186,9 @@ g_file_read_link (const gchar *filename,
{ {
read_size = readlink (filename, buffer, size); read_size = readlink (filename, buffer, size);
if (read_size < 0) { if (read_size < 0) {
g_free (buffer);
gchar *utf8_filename = g_filename_to_utf8 (filename, -1, gchar *utf8_filename = g_filename_to_utf8 (filename, -1,
NULL, NULL, NULL); NULL, NULL, NULL);
g_free (buffer);
g_set_error (error, g_set_error (error,
G_FILE_ERROR, G_FILE_ERROR,
g_file_error_from_errno (errno), g_file_error_from_errno (errno),