mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 05:18:23 +02:00
core: return instance from nm_dhcp_lease_ref()/nm_dhcp_lease_unref() for convenience
This commit is contained in:
parent
4ef4201b0a
commit
71eefff6e7
1 changed files with 4 additions and 2 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue