summaryrefslogtreecommitdiff
path: root/src/devices/nm-device-macvlan.c
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 /src/devices/nm-device-macvlan.c
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.
Diffstat (limited to 'src/devices/nm-device-macvlan.c')
-rw-r--r--src/devices/nm-device-macvlan.c10
1 files changed, 5 insertions, 5 deletions
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: