summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-07-28 16:06:11 +0200
committerThomas Haller <thaller@redhat.com>2019-07-29 18:39:49 +0200
commit25fd48948a23e5f3a9008e1f4211abcc92e1822a (patch)
tree621a9f2e6cc08d67b069649af8ea12bee74c62b8
parent0e44c294e7a37c055ff067fce83da966c600ebd4 (diff)
downloadNetworkManager-25fd48948a23e5f3a9008e1f4211abcc92e1822a.tar.gz
platform: make plobj argument of nmp_object_new() void pointer
NMPlatformObject is a base-type of all actual platform structs. We very seldomly use this type directly. Most callers that pass the plobj to nmp_object_new() will need to cast it. Make the varible a void pointer to not require the cast.
-rw-r--r--src/platform/nmp-object.c2
-rw-r--r--src/platform/nmp-object.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c
index 3c914f0c3e..5cbf9428f8 100644
--- a/src/platform/nmp-object.c
+++ b/src/platform/nmp-object.c
@@ -786,7 +786,7 @@ _nmp_object_new_from_class (const NMPClass *klass)
}
NMPObject *
-nmp_object_new (NMPObjectType obj_type, const NMPlatformObject *plobj)
+nmp_object_new (NMPObjectType obj_type, gconstpointer plobj)
{
const NMPClass *klass = nmp_class_from_type (obj_type);
NMPObject *obj;
diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h
index fc844aaf86..95173130cd 100644
--- a/src/platform/nmp-object.h
+++ b/src/platform/nmp-object.h
@@ -673,7 +673,7 @@ nmp_object_unref (const NMPObject *obj)
_changed; \
})
-NMPObject *nmp_object_new (NMPObjectType obj_type, const NMPlatformObject *plob);
+NMPObject *nmp_object_new (NMPObjectType obj_type, gconstpointer plobj);
NMPObject *nmp_object_new_link (int ifindex);
const NMPObject *nmp_object_stackinit (NMPObject *obj, NMPObjectType obj_type, gconstpointer plobj);