mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 10:10:18 +01:00
nmp-object/trivial: move code
This commit is contained in:
parent
250b1293f3
commit
0fd3c4e24c
1 changed files with 12 additions and 12 deletions
|
|
@ -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.
|
||||
* */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue