core: return instance from nm_dhcp_lease_ref()/nm_dhcp_lease_unref() for convenience

This commit is contained in:
Thomas Haller 2021-05-17 14:37:19 +02:00
parent 4ef4201b0a
commit 71eefff6e7
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -197,18 +197,20 @@ nm_dhcp_lease_get_options(NMDhcpLease *lease)
return (GHashTable *) lease;
}
static inline void
static inline NMDhcpLease *
nm_dhcp_lease_ref(NMDhcpLease *lease)
{
if (lease)
g_hash_table_ref((GHashTable *) lease);
return lease;
}
static inline void
static inline NMDhcpLease *
nm_dhcp_lease_unref(NMDhcpLease *lease)
{
if (lease)
g_hash_table_unref((GHashTable *) lease);
return NULL;
}
static inline const char *