summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-02-14 10:50:25 +0100
committerThomas Haller <thaller@redhat.com>2020-02-14 11:04:46 +0100
commitde62da297e506b1c5ad9b7dcc9132c681d089efe (patch)
tree7fb2357eb790bfeed23ef653955e76f5ca85e95e
parentd165787b54eb0d3577fe20be174c9e67901ed53a (diff)
downloadNetworkManager-de62da297e506b1c5ad9b7dcc9132c681d089efe.tar.gz
all: drop explicit casts from _GET_PRIVATE() macro calls
The _GET_PRIVATE() macros are all implemented based on _NM_GET_PRIVATE(). That macro tries to be more type safe and uses _Generic() to do the right thing. Explicitly casting is not only unnecessary, it defeats these (static) type checks. Don't do that.
-rw-r--r--shared/nm-libnm-core-intern/nm-auth-subject.c4
-rw-r--r--src/devices/adsl/nm-device-adsl.c8
-rw-r--r--src/devices/bluetooth/nm-device-bt.c6
-rw-r--r--src/devices/nm-device-6lowpan.c2
-rw-r--r--src/devices/nm-device-ethernet.c8
-rw-r--r--src/devices/nm-device-generic.c6
-rw-r--r--src/devices/nm-device-infiniband.c12
-rw-r--r--src/devices/nm-device-ip-tunnel.c8
-rw-r--r--src/devices/nm-device-macsec.c2
-rw-r--r--src/devices/nm-device-macvlan.c10
-rw-r--r--src/devices/nm-device-ppp.c2
-rw-r--r--src/devices/nm-device-tun.c2
-rw-r--r--src/devices/nm-device-vlan.c6
-rw-r--r--src/devices/nm-device-vxlan.c8
-rw-r--r--src/devices/wifi/nm-device-iwd.c4
-rw-r--r--src/devices/wifi/nm-device-olpc-mesh.c2
-rw-r--r--src/devices/wifi/nm-device-wifi.c4
-rw-r--r--src/devices/wwan/nm-modem.c6
-rw-r--r--src/dhcp/nm-dhcp-client.c4
-rw-r--r--src/dhcp/nm-dhcp-dhclient.c2
-rw-r--r--src/dhcp/nm-dhcp-dhcpcanon.c2
-rw-r--r--src/dhcp/nm-dhcp-dhcpcd.c2
-rw-r--r--src/dhcp/nm-dhcp-listener.c2
-rw-r--r--src/dhcp/nm-dhcp-nettools.c2
-rw-r--r--src/dhcp/nm-dhcp-systemd.c2
-rw-r--r--src/dnsmasq/nm-dnsmasq-manager.c2
-rw-r--r--src/ndisc/nm-fake-ndisc.c6
-rw-r--r--src/ndisc/nm-lndp-ndisc.c16
-rw-r--r--src/nm-active-connection.c2
-rw-r--r--src/nm-auth-manager.c2
-rw-r--r--src/nm-config-data.c2
-rw-r--r--src/nm-config.c2
-rw-r--r--src/nm-dhcp4-config.c4
-rw-r--r--src/nm-dhcp6-config.c4
-rw-r--r--src/nm-manager.c2
-rw-r--r--src/nm-pacrunner-manager.c2
-rw-r--r--src/platform/nm-fake-platform.c12
-rw-r--r--src/ppp/nm-ppp-manager.c6
-rw-r--r--src/settings/nm-agent-manager.c2
-rw-r--r--src/supplicant/nm-supplicant-config.c2
-rw-r--r--src/supplicant/nm-supplicant-interface.c4
-rw-r--r--src/vpn/nm-vpn-connection.c8
-rw-r--r--src/vpn/nm-vpn-manager.c2
43 files changed, 98 insertions, 98 deletions
diff --git a/shared/nm-libnm-core-intern/nm-auth-subject.c b/shared/nm-libnm-core-intern/nm-auth-subject.c
index 96bc6b0887..7d864e31a3 100644
--- a/shared/nm-libnm-core-intern/nm-auth-subject.c
+++ b/shared/nm-libnm-core-intern/nm-auth-subject.c
@@ -231,7 +231,7 @@ nm_auth_subject_new_unix_process_self (void)
static void
get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
- NMAuthSubjectPrivate *priv = NM_AUTH_SUBJECT_GET_PRIVATE ((NMAuthSubject *) object);
+ NMAuthSubjectPrivate *priv = NM_AUTH_SUBJECT_GET_PRIVATE (object);
switch (prop_id) {
case PROP_SUBJECT_TYPE:
@@ -258,7 +258,7 @@ get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
static void
set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
- NMAuthSubjectPrivate *priv = NM_AUTH_SUBJECT_GET_PRIVATE ((NMAuthSubject *) object);
+ NMAuthSubjectPrivate *priv = NM_AUTH_SUBJECT_GET_PRIVATE (object);
NMAuthSubjectType subject_type;
int i;
const char *str;
diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c
index 7c2b3e205e..1d39ad5334 100644
--- a/src/devices/adsl/nm-device-adsl.c
+++ b/src/devices/adsl/nm-device-adsl.c
@@ -58,7 +58,7 @@ struct _NMDeviceAdslClass {
G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE)
-#define NM_DEVICE_ADSL_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceAdsl, NM_IS_DEVICE_ADSL)
+#define NM_DEVICE_ADSL_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceAdsl, NM_IS_DEVICE_ADSL, NMDevice)
/*****************************************************************************/
@@ -577,7 +577,7 @@ get_property (GObject *object, guint prop_id,
{
switch (prop_id) {
case PROP_ATM_INDEX:
- g_value_set_int (value, NM_DEVICE_ADSL_GET_PRIVATE ((NMDeviceAdsl *) object)->atm_index);
+ g_value_set_int (value, NM_DEVICE_ADSL_GET_PRIVATE (object)->atm_index);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -592,7 +592,7 @@ set_property (GObject *object, guint prop_id,
switch (prop_id) {
case PROP_ATM_INDEX:
/* construct-only */
- NM_DEVICE_ADSL_GET_PRIVATE ((NMDeviceAdsl *) object)->atm_index = g_value_get_int (value);
+ NM_DEVICE_ADSL_GET_PRIVATE (object)->atm_index = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -646,7 +646,7 @@ dispose (GObject *object)
{
adsl_cleanup (NM_DEVICE_ADSL (object));
- nm_clear_g_source (&NM_DEVICE_ADSL_GET_PRIVATE ((NMDeviceAdsl *) object)->carrier_poll_id);
+ nm_clear_g_source (&NM_DEVICE_ADSL_GET_PRIVATE (object)->carrier_poll_id);
G_OBJECT_CLASS (nm_device_adsl_parent_class)->dispose (object);
}
diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c
index f59007b3c7..a6a4bd68c9 100644
--- a/src/devices/bluetooth/nm-device-bt.c
+++ b/src/devices/bluetooth/nm-device-bt.c
@@ -1153,7 +1153,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE ((NMDeviceBt *) object);
+ NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (object);
switch (prop_id) {
case PROP_BT_NAME:
@@ -1172,7 +1172,7 @@ static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
- NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE ((NMDeviceBt *) object);
+ NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (object);
switch (prop_id) {
case PROP_BT_BZ_MGR:
@@ -1296,7 +1296,7 @@ dispose (GObject *object)
static void
finalize (GObject *object)
{
- NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE ((NMDeviceBt *) object);
+ NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (object);
g_free (priv->connect_rfcomm_iface);
g_free (priv->dbus_path);
diff --git a/src/devices/nm-device-6lowpan.c b/src/devices/nm-device-6lowpan.c
index 0289a360d6..66ed54585c 100644
--- a/src/devices/nm-device-6lowpan.c
+++ b/src/devices/nm-device-6lowpan.c
@@ -34,7 +34,7 @@ struct _NMDevice6LowpanClass {
G_DEFINE_TYPE (NMDevice6Lowpan, nm_device_6lowpan, NM_TYPE_DEVICE)
-#define NM_DEVICE_6LOWPAN_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDevice6Lowpan, NM_IS_DEVICE_6LOWPAN)
+#define NM_DEVICE_6LOWPAN_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDevice6Lowpan, NM_IS_DEVICE_6LOWPAN, NMDevice)
/*****************************************************************************/
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
index bdb46844c6..3c478fa3ed 100644
--- a/src/devices/nm-device-ethernet.c
+++ b/src/devices/nm-device-ethernet.c
@@ -109,7 +109,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceEthernet,
G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
-#define NM_DEVICE_ETHERNET_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMDeviceEthernet, NM_IS_DEVICE_ETHERNET)
+#define NM_DEVICE_ETHERNET_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMDeviceEthernet, NM_IS_DEVICE_ETHERNET, NMDevice)
/*****************************************************************************/
@@ -1427,7 +1427,7 @@ get_configured_mtu (NMDevice *device,
gboolean *out_force)
{
/* MTU only set for plain ethernet */
- if (NM_DEVICE_ETHERNET_GET_PRIVATE ((NMDeviceEthernet *) device)->ppp_manager)
+ if (NM_DEVICE_ETHERNET_GET_PRIVATE (device)->ppp_manager)
return 0;
return nm_device_get_configured_mtu_for_wired (device, out_source, out_force);
@@ -1588,13 +1588,13 @@ get_s390_subchannels (NMDevice *device)
{
nm_assert (NM_IS_DEVICE_ETHERNET (device));
- return NM_DEVICE_ETHERNET_GET_PRIVATE ((NMDeviceEthernet *) device)->subchannels;
+ return NM_DEVICE_ETHERNET_GET_PRIVATE (device)->subchannels;
}
static void
update_connection (NMDevice *device, NMConnection *connection)
{
- NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE ((NMDeviceEthernet *) device);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
NMSettingWired *s_wired = nm_connection_get_setting_wired (connection);
gboolean perm_hw_addr_is_fake;
const char *perm_hw_addr;
diff --git a/src/devices/nm-device-generic.c b/src/devices/nm-device-generic.c
index 5f9e13c34f..cfe58029f6 100644
--- a/src/devices/nm-device-generic.c
+++ b/src/devices/nm-device-generic.c
@@ -32,7 +32,7 @@ struct _NMDeviceGenericClass {
G_DEFINE_TYPE (NMDeviceGeneric, nm_device_generic, NM_TYPE_DEVICE)
-#define NM_DEVICE_GENERIC_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceGeneric, NM_IS_DEVICE_GENERIC)
+#define NM_DEVICE_GENERIC_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceGeneric, NM_IS_DEVICE_GENERIC, NMDevice)
/*****************************************************************************/
@@ -50,8 +50,8 @@ get_generic_capabilities (NMDevice *device)
static const char *
get_type_description (NMDevice *device)
{
- if (NM_DEVICE_GENERIC_GET_PRIVATE ((NMDeviceGeneric *) device)->type_description)
- return NM_DEVICE_GENERIC_GET_PRIVATE ((NMDeviceGeneric *) device)->type_description;
+ if (NM_DEVICE_GENERIC_GET_PRIVATE (device)->type_description)
+ return NM_DEVICE_GENERIC_GET_PRIVATE (device)->type_description;
return NM_DEVICE_CLASS (nm_device_generic_parent_class)->get_type_description (device);
}
diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c
index 9f79d9bbf6..0ef74d252c 100644
--- a/src/devices/nm-device-infiniband.c
+++ b/src/devices/nm-device-infiniband.c
@@ -43,7 +43,7 @@ struct _NMDeviceInfinibandClass {
G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE)
-#define NM_DEVICE_INFINIBAND_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceInfiniband, NM_IS_DEVICE_INFINIBAND)
+#define NM_DEVICE_INFINIBAND_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceInfiniband, NM_IS_DEVICE_INFINIBAND, NMDevice)
/*****************************************************************************/
@@ -52,7 +52,7 @@ get_generic_capabilities (NMDevice *device)
{
guint32 caps = NM_DEVICE_CAP_CARRIER_DETECT;
- if (NM_DEVICE_INFINIBAND_GET_PRIVATE ((NMDeviceInfiniband *) device)->is_partition)
+ if (NM_DEVICE_INFINIBAND_GET_PRIVATE (device)->is_partition)
caps |= NM_DEVICE_CAP_IS_SOFTWARE;
return caps;
@@ -223,7 +223,7 @@ create_and_realize (NMDevice *device,
const NMPlatformLink **out_plink,
GError **error)
{
- NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE ((NMDeviceInfiniband *) device);
+ NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (device);
NMSettingInfiniband *s_infiniband;
int r;
@@ -281,7 +281,7 @@ unrealize (NMDevice *device, GError **error)
g_return_val_if_fail (NM_IS_DEVICE_INFINIBAND (device), FALSE);
- priv = NM_DEVICE_INFINIBAND_GET_PRIVATE ((NMDeviceInfiniband *) device);
+ priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (device);
if (priv->p_key < 0) {
g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
@@ -309,7 +309,7 @@ get_property (GObject *object, guint prop_id,
{
switch (prop_id) {
case PROP_IS_PARTITION:
- g_value_set_boolean (value, NM_DEVICE_INFINIBAND_GET_PRIVATE ((NMDeviceInfiniband *) object)->is_partition);
+ g_value_set_boolean (value, NM_DEVICE_INFINIBAND_GET_PRIVATE (object)->is_partition);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -323,7 +323,7 @@ set_property (GObject *object, guint prop_id,
{
switch (prop_id) {
case PROP_IS_PARTITION:
- NM_DEVICE_INFINIBAND_GET_PRIVATE ((NMDeviceInfiniband *) object)->is_partition = g_value_get_boolean (value);
+ NM_DEVICE_INFINIBAND_GET_PRIVATE (object)->is_partition = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c
index b08d76ae0d..74659090f8 100644
--- a/src/devices/nm-device-ip-tunnel.c
+++ b/src/devices/nm-device-ip-tunnel.c
@@ -67,7 +67,7 @@ struct _NMDeviceIPTunnelClass {
G_DEFINE_TYPE (NMDeviceIPTunnel, nm_device_ip_tunnel, NM_TYPE_DEVICE)
-#define NM_DEVICE_IP_TUNNEL_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceIPTunnel, NM_IS_DEVICE_IP_TUNNEL)
+#define NM_DEVICE_IP_TUNNEL_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceIPTunnel, NM_IS_DEVICE_IP_TUNNEL, NMDevice)
/*****************************************************************************/
@@ -935,7 +935,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDeviceIPTunnelPrivate *priv = NM_DEVICE_IP_TUNNEL_GET_PRIVATE ((NMDeviceIPTunnel *) object);
+ NMDeviceIPTunnelPrivate *priv = NM_DEVICE_IP_TUNNEL_GET_PRIVATE (object);
switch (prop_id) {
case PROP_MODE:
@@ -981,7 +981,7 @@ static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
- NMDeviceIPTunnelPrivate *priv = NM_DEVICE_IP_TUNNEL_GET_PRIVATE ((NMDeviceIPTunnel *) object);
+ NMDeviceIPTunnelPrivate *priv = NM_DEVICE_IP_TUNNEL_GET_PRIVATE (object);
switch (prop_id) {
case PROP_MODE:
@@ -1002,7 +1002,7 @@ nm_device_ip_tunnel_init (NMDeviceIPTunnel *self)
static void
constructed (GObject *object)
{
- NMDeviceIPTunnelPrivate *priv = NM_DEVICE_IP_TUNNEL_GET_PRIVATE ((NMDeviceIPTunnel *) object);
+ NMDeviceIPTunnelPrivate *priv = NM_DEVICE_IP_TUNNEL_GET_PRIVATE (object);
if (NM_IN_SET (priv->mode,
NM_IP_TUNNEL_MODE_IPIP6,
diff --git a/src/devices/nm-device-macsec.c b/src/devices/nm-device-macsec.c
index b7c9e7728e..fb18736703 100644
--- a/src/devices/nm-device-macsec.c
+++ b/src/devices/nm-device-macsec.c
@@ -69,7 +69,7 @@ struct _NMDeviceMacsecClass {
G_DEFINE_TYPE (NMDeviceMacsec, nm_device_macsec, NM_TYPE_DEVICE)
-#define NM_DEVICE_MACSEC_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceMacsec, NM_IS_DEVICE_MACSEC)
+#define NM_DEVICE_MACSEC_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceMacsec, NM_IS_DEVICE_MACSEC, NMDevice)
/******************************************************************/
diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c
index 3633f02d46..2f8c4c32cd 100644
--- a/src/devices/nm-device-macvlan.c
+++ b/src/devices/nm-device-macvlan.c
@@ -49,7 +49,7 @@ struct _NMDeviceMacvlanClass {
G_DEFINE_TYPE (NMDeviceMacvlan, nm_device_macvlan, NM_TYPE_DEVICE)
-#define NM_DEVICE_MACVLAN_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceMacvlan, NM_IS_DEVICE_MACVLAN)
+#define NM_DEVICE_MACVLAN_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceMacvlan, NM_IS_DEVICE_MACVLAN, NMDevice)
/*****************************************************************************/
@@ -292,7 +292,7 @@ is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
static gboolean
check_connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
{
- NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE ((NMDeviceMacvlan *) device);
+ NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE (device);
NMSettingMacvlan *s_macvlan;
const char *parent = NULL;
@@ -390,7 +390,7 @@ complete_connection (NMDevice *device,
static void
update_connection (NMDevice *device, NMConnection *connection)
{
- NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE ((NMDeviceMacvlan *) device);
+ NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE (device);
NMSettingMacvlan *s_macvlan = nm_connection_get_setting_macvlan (connection);
int new_mode;
@@ -422,7 +422,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE ((NMDeviceMacvlan *) object);
+ NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE (object);
switch (prop_id) {
case PROP_MODE:
@@ -444,7 +444,7 @@ static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
- NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE ((NMDeviceMacvlan *) object);
+ NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE (object);
switch (prop_id) {
case PROP_TAP:
diff --git a/src/devices/nm-device-ppp.c b/src/devices/nm-device-ppp.c
index 32403ff608..7af189962d 100644
--- a/src/devices/nm-device-ppp.c
+++ b/src/devices/nm-device-ppp.c
@@ -39,7 +39,7 @@ struct _NMDevicePppClass {
G_DEFINE_TYPE (NMDevicePpp, nm_device_ppp, NM_TYPE_DEVICE)
-#define NM_DEVICE_PPP_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDevicePpp, NM_IS_DEVICE_PPP)
+#define NM_DEVICE_PPP_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDevicePpp, NM_IS_DEVICE_PPP, NMDevice)
static NMDeviceCapabilities
get_generic_capabilities (NMDevice *device)
diff --git a/src/devices/nm-device-tun.c b/src/devices/nm-device-tun.c
index 77b46a599c..8d4680e2fd 100644
--- a/src/devices/nm-device-tun.c
+++ b/src/devices/nm-device-tun.c
@@ -48,7 +48,7 @@ struct _NMDeviceTunClass {
G_DEFINE_TYPE (NMDeviceTun, nm_device_tun, NM_TYPE_DEVICE)
-#define NM_DEVICE_TUN_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceTun, NM_IS_DEVICE_TUN)
+#define NM_DEVICE_TUN_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceTun, NM_IS_DEVICE_TUN, NMDevice)
/*****************************************************************************/
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c
index b6efeb81a5..183e9eff06 100644
--- a/src/devices/nm-device-vlan.c
+++ b/src/devices/nm-device-vlan.c
@@ -182,7 +182,7 @@ update_properties (NMDevice *device)
g_return_if_fail (NM_IS_DEVICE_VLAN (device));
- priv = NM_DEVICE_VLAN_GET_PRIVATE ((NMDeviceVlan *) device);
+ priv = NM_DEVICE_VLAN_GET_PRIVATE (device);
ifindex = nm_device_get_ifindex (device);
@@ -221,7 +221,7 @@ create_and_realize (NMDevice *device,
const NMPlatformLink **out_plink,
GError **error)
{
- NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE ((NMDeviceVlan *) device);
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device);
const char *iface = nm_device_get_iface (device);
NMSettingVlan *s_vlan;
int parent_ifindex;
@@ -318,7 +318,7 @@ is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
static gboolean
check_connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
{
- NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE ((NMDeviceVlan *) device);
+ NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device);
NMSettingVlan *s_vlan;
const char *parent;
diff --git a/src/devices/nm-device-vxlan.c b/src/devices/nm-device-vxlan.c
index 9be385bf93..b49e7c3edd 100644
--- a/src/devices/nm-device-vxlan.c
+++ b/src/devices/nm-device-vxlan.c
@@ -57,7 +57,7 @@ struct _NMDeviceVxlanClass {
G_DEFINE_TYPE (NMDeviceVxlan, nm_device_vxlan, NM_TYPE_DEVICE)
-#define NM_DEVICE_VXLAN_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceVxlan, NM_IS_DEVICE_VXLAN)
+#define NM_DEVICE_VXLAN_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceVxlan, NM_IS_DEVICE_VXLAN, NMDevice)
/*****************************************************************************/
@@ -232,7 +232,7 @@ address_matches (const char *str, in_addr_t addr4, struct in6_addr *addr6)
static gboolean
check_connection_compatible (NMDevice *device, NMConnection *connection, GError **error)
{
- NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE ((NMDeviceVxlan *) device);
+ NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE (device);
NMSettingVxlan *s_vxlan;
const char *parent;
@@ -369,7 +369,7 @@ complete_connection (NMDevice *device,
static void
update_connection (NMDevice *device, NMConnection *connection)
{
- NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE ((NMDeviceVxlan *) device);
+ NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE (device);
NMSettingVxlan *s_vxlan = nm_connection_get_setting_vxlan (connection);
char sbuf[NM_UTILS_INET_ADDRSTRLEN];
@@ -473,7 +473,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE ((NMDeviceVxlan *) object);
+ NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE (object);
switch (prop_id) {
case PROP_ID:
diff --git a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c
index 2954b517d6..b504c9bc90 100644
--- a/src/devices/wifi/nm-device-iwd.c
+++ b/src/devices/wifi/nm-device-iwd.c
@@ -86,7 +86,7 @@ struct _NMDeviceIwdClass {
G_DEFINE_TYPE (NMDeviceIwd, nm_device_iwd, NM_TYPE_DEVICE)
-#define NM_DEVICE_IWD_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceIwd, NM_IS_DEVICE_IWD)
+#define NM_DEVICE_IWD_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceIwd, NM_IS_DEVICE_IWD, NMDevice)
/*****************************************************************************/
@@ -1987,7 +1987,7 @@ device_state_changed (NMDevice *device,
static gboolean
get_enabled (NMDevice *device)
{
- return NM_DEVICE_IWD_GET_PRIVATE ((NMDeviceIwd *) device)->enabled;
+ return NM_DEVICE_IWD_GET_PRIVATE (device)->enabled;
}
static void
diff --git a/src/devices/wifi/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c
index c19ec76646..3ad4f016a3 100644
--- a/src/devices/wifi/nm-device-olpc-mesh.c
+++ b/src/devices/wifi/nm-device-olpc-mesh.c
@@ -57,7 +57,7 @@ struct _NMDeviceOlpcMeshClass {
G_DEFINE_TYPE (NMDeviceOlpcMesh, nm_device_olpc_mesh, NM_TYPE_DEVICE)
-#define NM_DEVICE_OLPC_MESH_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceOlpcMesh, NM_IS_DEVICE_OLPC_MESH)
+#define NM_DEVICE_OLPC_MESH_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDeviceOlpcMesh, NM_IS_DEVICE_OLPC_MESH, NMDevice)
/*****************************************************************************/
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index b8ef3da6d8..6df55e3a46 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -131,7 +131,7 @@ struct _NMDeviceWifiClass
G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
-#define NM_DEVICE_WIFI_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWifi, NM_IS_DEVICE_WIFI)
+#define NM_DEVICE_WIFI_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWifi, NM_IS_DEVICE_WIFI, NMDevice)
/*****************************************************************************/
@@ -3114,7 +3114,7 @@ device_state_changed (NMDevice *device,
static gboolean
get_enabled (NMDevice *device)
{
- return NM_DEVICE_WIFI_GET_PRIVATE ((NMDeviceWifi *) device)->enabled;
+ return NM_DEVICE_WIFI_GET_PRIVATE (device)->enabled;
}
static void
diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c
index ad6449b17e..0a8fa4235c 100644
--- a/src/devices/wwan/nm-modem.c
+++ b/src/devices/wwan/nm-modem.c
@@ -1710,7 +1710,7 @@ static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
- NMModemPrivate *priv = NM_MODEM_GET_PRIVATE ((NMModem *) object);
+ NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (object);
const char *s;
switch (prop_id) {
@@ -1796,7 +1796,7 @@ constructed (GObject *object)
static void
dispose (GObject *object)
{
- NMModemPrivate *priv = NM_MODEM_GET_PRIVATE ((NMModem *) object);
+ NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (object);
g_clear_object (&priv->act_request);
@@ -1806,7 +1806,7 @@ dispose (GObject *object)
static void
finalize (GObject *object)
{
- NMModemPrivate *priv = NM_MODEM_GET_PRIVATE ((NMModem *) object);
+ NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (object);
g_free (priv->uid);
g_free (priv->path);
diff --git a/src/dhcp/nm-dhcp-client.c b/src/dhcp/nm-dhcp-client.c
index faac18e01d..e7bc8831eb 100644
--- a/src/dhcp/nm-dhcp-client.c
+++ b/src/dhcp/nm-dhcp-client.c
@@ -940,7 +940,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE ((NMDhcpClient *) object);
+ NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (object);
switch (prop_id) {
case PROP_IFACE:
@@ -989,7 +989,7 @@ static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
- NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE ((NMDhcpClient *) object);
+ NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (object);
guint flags;
switch (prop_id) {
diff --git a/src/dhcp/nm-dhcp-dhclient.c b/src/dhcp/nm-dhcp-dhclient.c
index 869966fba2..617ce2366f 100644
--- a/src/dhcp/nm-dhcp-dhclient.c
+++ b/src/dhcp/nm-dhcp-dhclient.c
@@ -665,7 +665,7 @@ nm_dhcp_dhclient_init (NMDhcpDhclient *self)
static void
dispose (GObject *object)
{
- NMDhcpDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE ((NMDhcpDhclient *) object);
+ NMDhcpDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (object);
if (priv->dhcp_listener) {
g_signal_handlers_disconnect_by_func (priv->dhcp_listener,
diff --git a/src/dhcp/nm-dhcp-dhcpcanon.c b/src/dhcp/nm-dhcp-dhcpcanon.c
index f9cc0f0a37..63484a4b3c 100644
--- a/src/dhcp/nm-dhcp-dhcpcanon.c
+++ b/src/dhcp/nm-dhcp-dhcpcanon.c
@@ -207,7 +207,7 @@ nm_dhcp_dhcpcanon_init (NMDhcpDhcpcanon *self)
static void
dispose (GObject *object)
{
- NMDhcpDhcpcanonPrivate *priv = NM_DHCP_DHCPCANON_GET_PRIVATE ((NMDhcpDhcpcanon *) object);
+ NMDhcpDhcpcanonPrivate *priv = NM_DHCP_DHCPCANON_GET_PRIVATE (object);
if (priv->dhcp_listener) {
g_signal_handlers_disconnect_by_func (priv->dhcp_listener,
diff --git a/src/dhcp/nm-dhcp-dhcpcd.c b/src/dhcp/nm-dhcp-dhcpcd.c
index 1690bce519..ff695dbe88 100644
--- a/src/dhcp/nm-dhcp-dhcpcd.c
+++ b/src/dhcp/nm-dhcp-dhcpcd.c
@@ -200,7 +200,7 @@ nm_dhcp_dhcpcd_init (NMDhcpDhcpcd *self)
static void
dispose (GObject *object)
{
- NMDhcpDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE ((NMDhcpDhcpcd *) object);
+ NMDhcpDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE (object);
if (priv->dhcp_listener) {
g_signal_handlers_disconnect_by_func (priv->dhcp_listener,
diff --git a/src/dhcp/nm-dhcp-listener.c b/src/dhcp/nm-dhcp-listener.c
index a54b964359..9cd8f7d3cb 100644
--- a/src/dhcp/nm-dhcp-listener.c
+++ b/src/dhcp/nm-dhcp-listener.c
@@ -287,7 +287,7 @@ nm_dhcp_listener_init (NMDhcpListener *self)
static void
dispose (GObject *object)
{
- NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE ((NMDhcpListener *) object);
+ NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (object);
nm_clear_g_signal_handler (priv->dbus_mgr, &priv->new_conn_id);
nm_clear_g_signal_handler (priv->dbus_mgr, &priv->dis_conn_id);
diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c
index d3a9956260..ff73282489 100644
--- a/src/dhcp/nm-dhcp-nettools.c
+++ b/src/dhcp/nm-dhcp-nettools.c
@@ -1431,7 +1431,7 @@ nm_dhcp_nettools_init (NMDhcpNettools *self)
static void
dispose (GObject *object)
{
- NMDhcpNettoolsPrivate *priv = NM_DHCP_NETTOOLS_GET_PRIVATE ((NMDhcpNettools *) object);
+ NMDhcpNettoolsPrivate *priv = NM_DHCP_NETTOOLS_GET_PRIVATE (object);
nm_clear_pointer (&priv->lease_file, g_free);
nm_clear_g_source_inst (&priv->event_source);
diff --git a/src/dhcp/nm-dhcp-systemd.c b/src/dhcp/nm-dhcp-systemd.c
index 4f9b1113c1..da4bcb3604 100644
--- a/src/dhcp/nm-dhcp-systemd.c
+++ b/src/dhcp/nm-dhcp-systemd.c
@@ -1056,7 +1056,7 @@ nm_dhcp_systemd_init (NMDhcpSystemd *self)
static void
dispose (GObject *object)
{
- NMDhcpSystemdPrivate *priv = NM_DHCP_SYSTEMD_GET_PRIVATE ((NMDhcpSystemd *) object);
+ NMDhcpSystemdPrivate *priv = NM_DHCP_SYSTEMD_GET_PRIVATE (object);
g_clear_pointer (&priv->lease_file, g_free);
diff --git a/src/dnsmasq/nm-dnsmasq-manager.c b/src/dnsmasq/nm-dnsmasq-manager.c
index 983c525a00..5581f3fe3a 100644
--- a/src/dnsmasq/nm-dnsmasq-manager.c
+++ b/src/dnsmasq/nm-dnsmasq-manager.c
@@ -339,7 +339,7 @@ nm_dnsmasq_manager_new (const char *iface)
static void
finalize (GObject *object)
{
- NMDnsMasqManagerPrivate *priv = NM_DNSMASQ_MANAGER_GET_PRIVATE ((NMDnsMasqManager *) object);
+ NMDnsMasqManagerPrivate *priv = NM_DNSMASQ_MANAGER_GET_PRIVATE (object);
nm_dnsmasq_manager_stop (NM_DNSMASQ_MANAGER (object));
diff --git a/src/ndisc/nm-fake-ndisc.c b/src/ndisc/nm-fake-ndisc.c
index 851ff70721..5f4594b983 100644
--- a/src/ndisc/nm-fake-ndisc.c
+++ b/src/ndisc/nm-fake-ndisc.c
@@ -62,7 +62,7 @@ struct _NMFakeRNDiscClass {
G_DEFINE_TYPE (NMFakeNDisc, nm_fake_ndisc, NM_TYPE_NDISC)
-#define NM_FAKE_NDISC_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMFakeNDisc, NM_IS_FAKE_NDISC)
+#define NM_FAKE_NDISC_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMFakeNDisc, NM_IS_FAKE_NDISC, NMNDisc)
/*****************************************************************************/
@@ -326,7 +326,7 @@ receive_ra (gpointer user_data)
static void
start (NMNDisc *ndisc)
{
- NMFakeNDiscPrivate *priv = NM_FAKE_NDISC_GET_PRIVATE ((NMFakeNDisc *) ndisc);
+ NMFakeNDiscPrivate *priv = NM_FAKE_NDISC_GET_PRIVATE (ndisc);
FakeRa *ra;
/* Queue up the first fake RA */
@@ -366,7 +366,7 @@ nm_fake_ndisc_new (int ifindex, const char *ifname)
static void
dispose (GObject *object)
{
- NMFakeNDiscPrivate *priv = NM_FAKE_NDISC_GET_PRIVATE ((NMFakeNDisc *) object);
+ NMFakeNDiscPrivate *priv = NM_FAKE_NDISC_GET_PRIVATE (object);
nm_clear_g_source (&priv->receive_ra_id);
diff --git a/src/ndisc/nm-lndp-ndisc.c b/src/ndisc/nm-lndp-ndisc.c
index d8c1101c1c..75ab77bfd2 100644
--- a/src/ndisc/nm-lndp-ndisc.c
+++ b/src/ndisc/nm-lndp-ndisc.c
@@ -42,14 +42,14 @@ struct _NMLndpNDiscClass {
G_DEFINE_TYPE (NMLndpNDisc, nm_lndp_ndisc, NM_TYPE_NDISC)
-#define NM_LNDP_NDISC_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMLndpNDisc, NM_IS_LNDP_NDISC)
+#define NM_LNDP_NDISC_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMLndpNDisc, NM_IS_LNDP_NDISC, NMNDisc)
/*****************************************************************************/
static gboolean
send_rs (NMNDisc *ndisc, GError **error)
{
- NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE ((NMLndpNDisc *) ndisc);
+ NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE (ndisc);
struct ndp_msg *msg;
int errsv;
@@ -344,7 +344,7 @@ typedef struct {
static gboolean
send_ra (NMNDisc *ndisc, GError **error)
{
- NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE ((NMLndpNDisc *) ndisc);
+ NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE (ndisc);
NMNDiscDataInternal *rdata = ndisc->rdata;
gint32 now = nm_utils_get_monotonic_timestamp_sec ();
int errsv;
@@ -488,7 +488,7 @@ event_ready (int fd,
{
gs_unref_object NMNDisc *ndisc = g_object_ref (NM_NDISC (user_data));
nm_auto_pop_netns NMPNetns *netns = NULL;
- NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE ((NMLndpNDisc *) ndisc);
+ NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE (ndisc);
_LOGD ("processing libndp events");
@@ -505,7 +505,7 @@ event_ready (int fd,
static void
start (NMNDisc *ndisc)
{
- NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE ((NMLndpNDisc *) ndisc);
+ NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE (ndisc);
int fd;
g_return_if_fail (!priv->event_source);
@@ -596,7 +596,7 @@ nm_lndp_ndisc_new (NMPlatform *platform,
1, G_MAXINT32, NM_NDISC_ROUTER_SOLICITATION_INTERVAL_DEFAULT),
NULL);
- priv = NM_LNDP_NDISC_GET_PRIVATE ((NMLndpNDisc *) ndisc);
+ priv = NM_LNDP_NDISC_GET_PRIVATE (ndisc);
errsv = ndp_open (&priv->ndp);
@@ -614,8 +614,8 @@ nm_lndp_ndisc_new (NMPlatform *platform,
static void
dispose (GObject *object)
{
- NMNDisc *ndisc = (NMNDisc *) object;
- NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE ((NMLndpNDisc *) ndisc);
+ NMNDisc *ndisc = NM_NDISC (object);
+ NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE (ndisc);
nm_clear_g_source_inst (&priv->event_source);
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c
index 149385ef3f..b8cfc0d1fe 100644
--- a/src/nm-active-connection.c
+++ b/src/nm-active-connection.c
@@ -1246,7 +1246,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE ((NMActiveConnection *) object);
+ NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
char **strv;
NMDevice *master_device = NULL;
diff --git a/src/nm-auth-manager.c b/src/nm-auth-manager.c
index 186d56e41f..88e6cb9433 100644
--- a/src/nm-auth-manager.c
+++ b/src/nm-auth-manager.c
@@ -465,7 +465,7 @@ nm_auth_manager_force_shutdown (NMAuthManager *self)
static void
set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
- NMAuthManagerPrivate *priv = NM_AUTH_MANAGER_GET_PRIVATE ((NMAuthManager *) object);
+ NMAuthManagerPrivate *priv = NM_AUTH_MANAGER_GET_PRIVATE (object);
int v_int;
switch (prop_id) {
diff --git a/src/nm-config-data.c b/src/nm-config-data.c
index e5593d822a..29dafa14ed 100644
--- a/src/nm-config-data.c
+++ b/src/nm-config-data.c
@@ -1875,7 +1875,7 @@ nm_config_data_new_update_no_auto_default (const NMConfigData *base,
static void
finalize (GObject *gobject)
{
- NMConfigDataPrivate *priv = NM_CONFIG_DATA_GET_PRIVATE ((NMConfigData *) gobject);
+ NMConfigDataPrivate *priv = NM_CONFIG_DATA_GET_PRIVATE (gobject);
g_free (priv->config_main_file);
g_free (priv->config_description);
diff --git a/src/nm-config.c b/src/nm-config.c
index aa1d831abd..f317e94880 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -2889,7 +2889,7 @@ nm_config_new (const NMConfigCmdLineOptions *cli, char **atomic_section_prefixes
static void
finalize (GObject *gobject)
{
- NMConfigPrivate *priv = NM_CONFIG_GET_PRIVATE ((NMConfig *) gobject);
+ NMConfigPrivate *priv = NM_CONFIG_GET_PRIVATE (gobject);
state_free (priv->state);
diff --git a/src/nm-dhcp4-config.c b/src/nm-dhcp4-config.c
index cdbe207111..f64c72574b 100644
--- a/src/nm-dhcp4-config.c
+++ b/src/nm-dhcp4-config.c
@@ -82,7 +82,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE ((NMDhcp4Config *) object);
+ NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (object);
switch (prop_id) {
case PROP_OPTIONS:
@@ -114,7 +114,7 @@ nm_dhcp4_config_new (void)
static void
finalize (GObject *object)
{
- NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE ((NMDhcp4Config *) object);
+ NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (object);
g_variant_unref (priv->options);
diff --git a/src/nm-dhcp6-config.c b/src/nm-dhcp6-config.c
index 676caa6dfc..a50abd1285 100644
--- a/src/nm-dhcp6-config.c
+++ b/src/nm-dhcp6-config.c
@@ -82,7 +82,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE ((NMDhcp6Config *) object);
+ NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (object);
switch (prop_id) {
case PROP_OPTIONS:
@@ -112,7 +112,7 @@ nm_dhcp6_config_new (void)
static void
finalize (GObject *object)
{
- NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE ((NMDhcp6Config *) object);
+ NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (object);
g_variant_unref (priv->options);
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 9d7a087281..c610a67638 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -7845,7 +7845,7 @@ dispose (GObject *object)
static void
finalize (GObject *object)
{
- NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE ((NMManager *) object);
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (object);
g_array_free (priv->capabilities, TRUE);
diff --git a/src/nm-pacrunner-manager.c b/src/nm-pacrunner-manager.c
index 091a630536..0324ccaadd 100644
--- a/src/nm-pacrunner-manager.c
+++ b/src/nm-pacrunner-manager.c
@@ -610,7 +610,7 @@ nm_pacrunner_manager_init (NMPacrunnerManager *self)
static void
dispose (GObject *object)
{
- NMPacrunnerManagerPrivate *priv = NM_PACRUNNER_MANAGER_GET_PRIVATE ((NMPacrunnerManager *) object);
+ NMPacrunnerManagerPrivate *priv = NM_PACRUNNER_MANAGER_GET_PRIVATE (object);
nm_assert (c_list_is_empty (&priv->conf_id_lst_head));
diff --git a/src/platform/nm-fake-platform.c b/src/platform/nm-fake-platform.c
index 2d2524624d..8986d4d835 100644
--- a/src/platform/nm-fake-platform.c
+++ b/src/platform/nm-fake-platform.c
@@ -46,7 +46,7 @@ struct _NMFakePlatformClass {
G_DEFINE_TYPE (NMFakePlatform, nm_fake_platform, NM_TYPE_PLATFORM)
-#define NM_FAKE_PLATFORM_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMFakePlatform, NM_IS_FAKE_PLATFORM)
+#define NM_FAKE_PLATFORM_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMFakePlatform, NM_IS_FAKE_PLATFORM, NMPlatform)
/*****************************************************************************/
@@ -126,7 +126,7 @@ static gboolean ip6_address_delete (NMPlatform *platform, int ifindex, struct in
static gboolean
sysctl_set (NMPlatform *platform, const char *pathid, int dirfd, const char *path, const char *value)
{
- NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE ((NMFakePlatform *) platform);
+ NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE (platform);
ASSERT_SYSCTL_ARGS (pathid, dirfd, path);
@@ -138,7 +138,7 @@ sysctl_set (NMPlatform *platform, const char *pathid, int dirfd, const char *pat
static char *
sysctl_get (NMPlatform *platform, const char *pathid, int dirfd, const char *path)
{
- NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE ((NMFakePlatform *) platform);
+ NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE (platform);
const char *v;
ASSERT_SYSCTL_ARGS (pathid, dirfd, path);
@@ -155,7 +155,7 @@ sysctl_get (NMPlatform *platform, const char *pathid, int dirfd, const char *pat
static NMFakePlatformLink *
link_get (NMPlatform *platform, int ifindex)
{
- NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE ((NMFakePlatform *) platform);
+ NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE (platform);
NMFakePlatformLink *device;
int idx;
@@ -223,7 +223,7 @@ link_add_pre (NMPlatform *platform,
const void *address,
size_t address_len)
{
- NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE ((NMFakePlatform *) platform);
+ NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE (platform);
NMFakePlatformLink *device;
int ifindex;
NMPObject *o;
@@ -1338,7 +1338,7 @@ nm_fake_platform_setup (void)
static void
finalize (GObject *object)
{
- NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE ((NMFakePlatform *) object);
+ NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE (object);
int i;
g_hash_table_unref (priv->options);
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c
index 67c3b0f869..751ec28b94 100644
--- a/src/ppp/nm-ppp-manager.c
+++ b/src/ppp/nm-ppp-manager.c
@@ -1261,7 +1261,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE ((NMPPPManager *) object);
+ NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (object);
switch (prop_id) {
case PROP_PARENT_IFACE:
@@ -1277,7 +1277,7 @@ static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
- NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE ((NMPPPManager *) object);
+ NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (object);
switch (prop_id) {
case PROP_PARENT_IFACE:
@@ -1335,7 +1335,7 @@ dispose (GObject *object)
static void
finalize (GObject *object)
{
- NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE ((NMPPPManager *) object);
+ NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (object);
g_free (priv->parent_iface);
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c
index 1519361314..363b117581 100644
--- a/src/settings/nm-agent-manager.c
+++ b/src/settings/nm-agent-manager.c
@@ -1493,7 +1493,7 @@ nm_agent_manager_init (NMAgentManager *self)
static void
constructed (GObject *object)
{
- NMAgentManagerPrivate *priv = NM_AGENT_MANAGER_GET_PRIVATE ((NMAgentManager *) object);
+ NMAgentManagerPrivate *priv = NM_AGENT_MANAGER_GET_PRIVATE (object);
G_OBJECT_CLASS (nm_agent_manager_parent_class)->constructed (object);
diff --git a/src/supplicant/nm-supplicant-config.c b/src/supplicant/nm-supplicant-config.c
index 403b50edb2..2e16f278e1 100644
--- a/src/supplicant/nm-supplicant-config.c
+++ b/src/supplicant/nm-supplicant-config.c
@@ -256,7 +256,7 @@ nm_supplicant_config_add_blob_for_connection (NMSupplicantConfig *self,
static void
nm_supplicant_config_finalize (GObject *object)
{
- NMSupplicantConfigPrivate *priv = NM_SUPPLICANT_CONFIG_GET_PRIVATE ((NMSupplicantConfig *) object);
+ NMSupplicantConfigPrivate *priv = NM_SUPPLICANT_CONFIG_GET_PRIVATE (object);
g_hash_table_destroy (priv->config);
g_hash_table_destroy (priv->blobs);
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c
index e25928c14d..fca997aa2d 100644
--- a/src/supplicant/nm-supplicant-interface.c
+++ b/src/supplicant/nm-supplicant-interface.c
@@ -2534,7 +2534,7 @@ get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE ((NMSupplicantInterface *) object);
+ NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (object);
switch (prop_id) {
case PROP_SCANNING:
@@ -2570,7 +2570,7 @@ set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE ((NMSupplicantInterface *) object);
+ NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (object);
switch (prop_id) {
case PROP_IFACE:
diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c
index e1b17e725c..f3e4a6812e 100644
--- a/src/vpn/nm-vpn-connection.c
+++ b/src/vpn/nm-vpn-connection.c
@@ -141,7 +141,7 @@ struct _NMVpnConnectionClass {
G_DEFINE_TYPE (NMVpnConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION)
-#define NM_VPN_CONNECTION_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMVpnConnection, NM_IS_VPN_CONNECTION)
+#define NM_VPN_CONNECTION_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMVpnConnection, NM_IS_VPN_CONNECTION, NMActiveConnection)
/*****************************************************************************/
@@ -2717,7 +2717,7 @@ device_changed (NMActiveConnection *active,
NMDevice *new_device,
NMDevice *old_device)
{
- NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE ((NMVpnConnection *) active);
+ NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (active);
if (!_service_and_connection_can_persist (NM_VPN_CONNECTION (active)))
return;
@@ -2792,7 +2792,7 @@ dispose (GObject *object)
static void
finalize (GObject *object)
{
- NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE ((NMVpnConnection *) object);
+ NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object);
g_free (priv->banner);
g_free (priv->ip_iface);
@@ -2815,7 +2815,7 @@ static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE ((NMVpnConnection *) object);
+ NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object);
NMDevice *parent_dev;
switch (prop_id) {
diff --git a/src/vpn/nm-vpn-manager.c b/src/vpn/nm-vpn-manager.c
index 4c94a26057..a80ab71ed9 100644
--- a/src/vpn/nm-vpn-manager.c
+++ b/src/vpn/nm-vpn-manager.c
@@ -244,7 +244,7 @@ nm_vpn_manager_init (NMVpnManager *self)
static void
dispose (GObject *object)
{
- NMVpnManagerPrivate *priv = NM_VPN_MANAGER_GET_PRIVATE ((NMVpnManager *) object);
+ NMVpnManagerPrivate *priv = NM_VPN_MANAGER_GET_PRIVATE (object);
if (priv->monitor_etc) {
if (priv->monitor_id_etc)