core: fix casting of factory type (bgo #736780)

UINT is just 32bit, truncating the GType on 64-bit platforms. We do already use
cast to SIZE, which is as wide as a pointer, when we need a GType in another
place (nmtui); let's do it here as well.

Broken by [0bc1b5138] core: add support for internal device factories

https://bugzilla.gnome.org/show_bug.cgi?id=736780
This commit is contained in:
Lubomir Rintel 2014-09-17 10:54:33 +02:00 committed by Jiří Klimeš
parent 579ceea931
commit b05c8dbda5

View file

@ -1995,7 +1995,7 @@ load_device_factories (NMManager *self)
/* Register internal factories first */
for (iter = nm_device_factory_get_internal_factory_types (); iter; iter = iter->next) {
GType ftype = GPOINTER_TO_UINT (iter->data);
GType ftype = (GType) GPOINTER_TO_SIZE (iter->data);
factory = (NMDeviceFactory *) g_object_new (ftype, NULL);
g_assert (factory);