mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 12:40:11 +01:00
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:
parent
579ceea931
commit
b05c8dbda5
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue