diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index ccd9fd0868..5f55832609 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -1533,7 +1533,7 @@ static void delayed_action_handle_MASTER_CONNECTED (NMPlatform *platform, int master_ifindex) { NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform); - auto_nmp_obj NMPObject *obj_cache = NULL; + nm_auto_nmpobj NMPObject *obj_cache = NULL; gboolean was_visible; NMPCacheOpsType cache_op; @@ -1780,7 +1780,7 @@ cache_prune_candidates_prune (NMPlatform *platform) g_hash_table_iter_init (&iter, prune_candidates); while (g_hash_table_iter_next (&iter, (gpointer *)&obj, NULL)) { - auto_nmp_obj NMPObject *obj_cache = NULL; + nm_auto_nmpobj NMPObject *obj_cache = NULL; _LOGT ("cache-prune: prune %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ALL, NULL, 0)); cache_op = nmp_cache_remove (priv->cache, obj, TRUE, &obj_cache, &was_visible, cache_pre_hook, platform); @@ -2373,7 +2373,7 @@ event_notification (struct nl_msg *msg, gpointer user_data) NMPlatform *platform = NM_PLATFORM (user_data); NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (user_data); auto_nl_object struct nl_object *nlo = NULL; - auto_nmp_obj NMPObject *obj = NULL; + nm_auto_nmpobj NMPObject *obj = NULL; struct nlmsghdr *msghdr; char buf_nlmsg_type[16]; @@ -2409,7 +2409,7 @@ event_notification (struct nl_msg *msg, gpointer user_data) } if (obj) { - auto_nmp_obj NMPObject *obj_cache = NULL; + nm_auto_nmpobj NMPObject *obj_cache = NULL; switch (msghdr->nlmsg_type) { @@ -4806,7 +4806,7 @@ static void cache_update_link_udev (NMPlatform *platform, int ifindex, GUdevDevice *udev_device) { NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform); - auto_nmp_obj NMPObject *obj_cache = NULL; + nm_auto_nmpobj NMPObject *obj_cache = NULL; gboolean was_visible; NMPCacheOpsType cache_op; diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index abbde4c698..a8264827be 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -1380,7 +1380,7 @@ nmp_cache_remove_netlink (NMPCache *cache, const NMPObject *obj_needle, NMPObjec { if (NMP_OBJECT_GET_TYPE (obj_needle) == NMP_OBJECT_TYPE_LINK) { NMPObject *old; - auto_nmp_obj NMPObject *obj = NULL; + nm_auto_nmpobj NMPObject *obj = NULL; /* For nmp_cache_remove_netlink() we have an incomplete @obj_needle instance to be * removed from netlink. Link objects are alive without being in netlink when they @@ -1575,7 +1575,7 @@ NMPCacheOpsType nmp_cache_update_link_udev (NMPCache *cache, int ifindex, GUdevDevice *udev_device, NMPObject **out_obj, gboolean *out_was_visible, NMPCachePreHook pre_hook, gpointer user_data) { NMPObject *old; - auto_nmp_obj NMPObject *obj = NULL; + nm_auto_nmpobj NMPObject *obj = NULL; old = (NMPObject *) nmp_cache_lookup_link (cache, ifindex); @@ -1642,7 +1642,7 @@ NMPCacheOpsType nmp_cache_update_link_master_connected (NMPCache *cache, int ifindex, NMPObject **out_obj, gboolean *out_was_visible, NMPCachePreHook pre_hook, gpointer user_data) { NMPObject *old; - auto_nmp_obj NMPObject *obj = NULL; + nm_auto_nmpobj NMPObject *obj = NULL; old = (NMPObject *) nmp_cache_lookup_link (cache, ifindex); diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h index 1367e8e67c..cc8e801f92 100644 --- a/src/platform/nmp-object.h +++ b/src/platform/nmp-object.h @@ -286,9 +286,9 @@ gboolean nmp_object_is_visible (const NMPObject *obj); void _nmp_object_fixup_link_udev_fields (NMPObject *obj, gboolean use_udev); -#define auto_nmp_obj __attribute__((cleanup(_nmp_auto_obj_cleanup))) +#define nm_auto_nmpobj __attribute__((cleanup(_nm_auto_nmpobj_cleanup))) static inline void -_nmp_auto_obj_cleanup (NMPObject **pobj) +_nm_auto_nmpobj_cleanup (NMPObject **pobj) { nmp_object_unref (*pobj); } diff --git a/src/platform/tests/test-nmp-object.c b/src/platform/tests/test-nmp-object.c index 836353bb2d..eba2383b3b 100644 --- a/src/platform/tests/test-nmp-object.c +++ b/src/platform/tests/test-nmp-object.c @@ -148,8 +148,8 @@ _nmp_cache_update_netlink (NMPCache *cache, NMPObject *obj, NMPObject **out_obj, NMPCacheOpsType ops_type; NMPObject *obj2; gboolean was_visible; - auto_nmp_obj NMPObject *obj_clone = nmp_object_clone (obj, FALSE); - auto_nmp_obj NMPObject *new_clone = NULL; + nm_auto_nmpobj NMPObject *obj_clone = nmp_object_clone (obj, FALSE); + nm_auto_nmpobj NMPObject *new_clone = NULL; const NMPObject *obj_old; _NMPCacheUpdateData data = { .cache = cache,