Commit a13b2397 authored by Thomas Haller's avatar Thomas Haller

ifcfg-rh: don't rely on g_steal_pointer() returning a void pointer

Next, we will update g_steal_pointer() to cast the return type
to the type of the argument. Hence, this automatic conversion
from setting (sub) classes to NMSetting no longer works.

Add an explict cast.
parent 787a18c4
......@@ -1425,8 +1425,8 @@ make_user_setting (shvarFile *ifcfg)
has_user_data = TRUE;
return has_user_data
? g_steal_pointer (&s_user)
return has_user_data
? NM_SETTING (g_steal_pointer (&s_user))
......@@ -1611,7 +1611,7 @@ make_ip4_setting (shvarFile *ifcfg,
return g_steal_pointer (&s_ip4);
return NM_SETTING (g_steal_pointer (&s_ip4));
/* Handle DHCP settings */
nm_clear_g_free (&value);
......@@ -1802,7 +1802,7 @@ make_ip4_setting (shvarFile *ifcfg,
g_object_set (s_ip4, NM_SETTING_IP_CONFIG_DAD_TIMEOUT, (int) timeout, NULL);
return g_steal_pointer (&s_ip4);
return NM_SETTING (g_steal_pointer (&s_ip4));
static void
......@@ -2944,7 +2944,7 @@ make_wep_setting (shvarFile *ifcfg,
return NULL;
return g_steal_pointer (&s_wsec);
return NM_SETTING (g_steal_pointer (&s_wsec));
static gboolean
......@@ -5386,7 +5386,7 @@ make_vlan_setting (shvarFile *ifcfg,
parse_prio_map_list (s_vlan, ifcfg, "VLAN_INGRESS_PRIORITY_MAP", NM_VLAN_INGRESS_MAP);
parse_prio_map_list (s_vlan, ifcfg, "VLAN_EGRESS_PRIORITY_MAP", NM_VLAN_EGRESS_MAP);
return g_steal_pointer (&s_vlan);
return NM_SETTING (g_steal_pointer (&s_vlan));
static NMConnection *
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment