Drop leftover use of a union.

2007-08-01  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (get_special_folder): Drop leftover use of a
	union.


svn path=/trunk/; revision=5661
This commit is contained in:
Tor Lillqvist
2007-08-01 09:49:02 +00:00
committed by Tor Lillqvist
parent 164f21f66e
commit 75f974d1d9
2 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,8 @@
2007-08-01 Tor Lillqvist <tml@novell.com> 2007-08-01 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (get_special_folder): Drop leftover use of a
union.
* glibconfig.h.win32.in: Update to match what configure produces. * glibconfig.h.win32.in: Update to match what configure produces.
2007-07-31 Matthias Clasen <mclasen@redhat.com> 2007-07-31 Matthias Clasen <mclasen@redhat.com>

View File

@@ -1409,10 +1409,7 @@ static gchar **g_user_special_dirs = NULL;
static gchar * static gchar *
get_special_folder (int csidl) get_special_folder (int csidl)
{ {
union { wchar_t path[MAX_PATH+1];
char c[MAX_PATH+1];
wchar_t wc[MAX_PATH+1];
} path;
HRESULT hr; HRESULT hr;
LPITEMIDLIST pidl = NULL; LPITEMIDLIST pidl = NULL;
BOOL b; BOOL b;
@@ -1421,9 +1418,9 @@ get_special_folder (int csidl)
hr = SHGetSpecialFolderLocation (NULL, csidl, &pidl); hr = SHGetSpecialFolderLocation (NULL, csidl, &pidl);
if (hr == S_OK) if (hr == S_OK)
{ {
b = SHGetPathFromIDListW (pidl, path.wc); b = SHGetPathFromIDListW (pidl, path);
if (b) if (b)
retval = g_utf16_to_utf8 (path.wc, -1, NULL, NULL, NULL); retval = g_utf16_to_utf8 (path, -1, NULL, NULL, NULL);
CoTaskMemFree (pidl); CoTaskMemFree (pidl);
} }
return retval; return retval;