diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-20 12:55:14 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-11-23 14:44:24 +0100 |
commit | f7d83e681fb634be3f11cbf6df29122ebbf7c6e3 (patch) | |
tree | 7dc0f24734484e1d45fb37925990ccbc1c16b97b | |
parent | 48960ba8da334ffd674a72bdc53b940ef99e966b (diff) | |
download | NetworkManager-f7d83e681fb634be3f11cbf6df29122ebbf7c6e3.tar.gz |
platform: move nmp_object_equal() to header for inline
-rw-r--r-- | src/platform/nmp-object.c | 6 | ||||
-rw-r--r-- | src/platform/nmp-object.h | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index 0c951dd4fc..4b511ff2f5 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -861,12 +861,6 @@ _vt_cmd_obj_cmp_lnk_vlan (const NMPObject *obj1, const NMPObject *obj2) return c; } -gboolean -nmp_object_equal (const NMPObject *obj1, const NMPObject *obj2) -{ - return nmp_object_cmp (obj1, obj2) == 0; -} - /* @src is a const object, which is not entirely correct for link types, where * we increase the ref count for src->_link.udev.device. * Hence, nmp_object_copy() can violate the const promise of @src. diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h index 6db7573a99..d8fe60a60e 100644 --- a/src/platform/nmp-object.h +++ b/src/platform/nmp-object.h @@ -471,7 +471,13 @@ const NMPObject *nmp_object_stackinit_id_ip6_address (NMPObject *obj, int ifinde const char *nmp_object_to_string (const NMPObject *obj, NMPObjectToStringMode to_string_mode, char *buf, gsize buf_size); void nmp_object_hash_update (const NMPObject *obj, NMHashState *h); int nmp_object_cmp (const NMPObject *obj1, const NMPObject *obj2); -gboolean nmp_object_equal (const NMPObject *obj1, const NMPObject *obj2); + +static inline gboolean +nmp_object_equal (const NMPObject *obj1, const NMPObject *obj2) +{ + return nmp_object_cmp (obj1, obj2) == 0; +} + void nmp_object_copy (NMPObject *dst, const NMPObject *src, gboolean id_only); NMPObject *nmp_object_clone (const NMPObject *obj, gboolean id_only); |