From 80f6f4e115a513029720049065d2d4e24115ef75 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 15 Apr 2021 19:44:31 +0200 Subject: [PATCH] core: use NM_CAST_PPTR() for nm_dbus_object_clear_and_unexport() This ensures that the argument is some pointer to pointer. This gives a bit of additional compile time safety, but in general, it still casts any pointer to pointer (because that's what we require, as most arguments won't be of type NMDBusObject to begin with). --- src/core/nm-dbus-object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/nm-dbus-object.h b/src/core/nm-dbus-object.h index d94bd5df45..94eb2d0d76 100644 --- a/src/core/nm-dbus-object.h +++ b/src/core/nm-dbus-object.h @@ -168,7 +168,7 @@ void nm_dbus_object_unexport_on_idle(gpointer /* (NMDBusObject *) */ self_take); void _nm_dbus_object_clear_and_unexport(NMDBusObject **location); #define nm_dbus_object_clear_and_unexport(location) \ - _nm_dbus_object_clear_and_unexport((NMDBusObject **) (location)) + _nm_dbus_object_clear_and_unexport(NM_CAST_PPTR(NMDBusObject, (location))) void nm_dbus_object_emit_signal_variant(NMDBusObject * self, const NMDBusInterfaceInfoExtended *interface_info,