From b05c8dbda572d558d04b32da4c4f36b512ac0150 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 17 Sep 2014 10:54:33 +0200 Subject: [PATCH] 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 --- src/nm-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index cf0849b5d8..09a994c63f 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -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);