Fix a C99ism, spotted by Crispin Flowerday.

2005-12-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c (cb_fill_in_mime_type): Fix a C99ism,
	spotted by Crispin Flowerday.
This commit is contained in:
Matthias Clasen
2005-12-07 14:00:26 +00:00
committed by Matthias Clasen
parent 1d2e767a91
commit 3f4cc9b6c8
3 changed files with 13 additions and 2 deletions

View File

@ -2154,15 +2154,16 @@ cb_fill_in_mime_type (gpointer key, gpointer value, gpointer user_data)
GtkFileFolderUnix *folder_unix = user_data;
char *fullname = g_build_filename (folder_unix->filename, basename, NULL);
struct stat *statbuf = NULL;
const char *mime_type;
if (folder_unix->have_stat)
statbuf = &entry->statbuf;
const char *mime_type = xdg_mime_get_mime_type_for_file (fullname, statbuf);
mime_type = xdg_mime_get_mime_type_for_file (fullname, statbuf);
entry->mime_type = g_strdup (mime_type);
g_free (fullname);
/* FIXME: free on NULL? */
return FALSE;
}