summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-10-12 13:32:20 +0200
committerThomas Haller <thaller@redhat.com>2015-11-01 17:28:08 +0100
commit0fd3c4e24c33c2d2f3b92309f2d2263e7c2266c0 (patch)
tree4db4440968e2a2018d027d712c074601c4c31388
parent250b1293f3feec44a31fe1689cb81c2691a7dec7 (diff)
downloadNetworkManager-0fd3c4e24c33c2d2f3b92309f2d2263e7c2266c0.tar.gz
nmp-object/trivial: move code
-rw-r--r--src/platform/nmp-object.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c
index edfb8000f4..7be3577484 100644
--- a/src/platform/nmp-object.c
+++ b/src/platform/nmp-object.c
@@ -522,6 +522,18 @@ nmp_object_copy (NMPObject *dst, const NMPObject *src, gboolean id_only)
}
}
+static void
+_vt_cmd_obj_copy_link (NMPObject *dst, const NMPObject *src)
+{
+ if (dst->_link.udev.device != src->_link.udev.device) {
+ if (dst->_link.udev.device)
+ g_object_unref (dst->_link.udev.device);
+ if (src->_link.udev.device)
+ g_object_ref (src->_link.udev.device);
+ }
+ dst->_link = src->_link;
+}
+
#define _vt_cmd_plobj_id_copy(type, plat_type, cmd) \
static void \
_vt_cmd_plobj_id_copy_##type (NMPlatformObject *_dst, const NMPlatformObject *_src) \
@@ -556,18 +568,6 @@ _vt_cmd_plobj_id_copy (ip6_route, NMPlatformIP6Route, {
dst->network = src->network;
});
-static void
-_vt_cmd_obj_copy_link (NMPObject *dst, const NMPObject *src)
-{
- if (dst->_link.udev.device != src->_link.udev.device) {
- if (dst->_link.udev.device)
- g_object_unref (dst->_link.udev.device);
- if (src->_link.udev.device)
- g_object_ref (src->_link.udev.device);
- }
- dst->_link = src->_link;
-}
-
/* Uses internally nmp_object_copy(), hence it also violates the const
* promise for @obj.
* */