diff options
author | Thomas Haller <thaller@redhat.com> | 2019-10-22 16:51:09 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-10-27 14:30:51 +0100 |
commit | 0dfabef46e315a42155c6e0c654f8515a1ec6b2f (patch) | |
tree | 2e63a52654da888bd326248ae4e1e2fef00df387 /libnm/nm-device-vxlan.c | |
parent | 8c7da62f9b5a466492cdf44470d64c2ac6c7938b (diff) | |
download | NetworkManager-0dfabef46e315a42155c6e0c654f8515a1ec6b2f.tar.gz |
libnm: add and use _nml_coerce_property_*()
Our NMObject implementations should behave in a similar manner.
For example, string properties should be coerced the a consistent
manner.
Add functions _nml_coerce_property_*() for that. Of course, they
are trivial. Their value is not that they encapsulate some complex
implementation, but that they convey a general concept of how we
want to handle certain properties in NMClient's object cache.
Diffstat (limited to 'libnm/nm-device-vxlan.c')
-rw-r--r-- | libnm/nm-device-vxlan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libnm/nm-device-vxlan.c b/libnm/nm-device-vxlan.c index f63e1bdf57..27d7db1d7e 100644 --- a/libnm/nm-device-vxlan.c +++ b/libnm/nm-device-vxlan.c @@ -86,7 +86,7 @@ nm_device_vxlan_get_hw_address (NMDeviceVxlan *device) { g_return_val_if_fail (NM_IS_DEVICE_VXLAN (device), NULL); - return nm_str_not_empty (NM_DEVICE_VXLAN_GET_PRIVATE (device)->hw_address); + return _nml_coerce_property_str_not_empty (NM_DEVICE_VXLAN_GET_PRIVATE (device)->hw_address); } /** @@ -156,7 +156,7 @@ nm_device_vxlan_get_group (NMDeviceVxlan *device) { g_return_val_if_fail (NM_IS_DEVICE_VXLAN (device), NULL); - return nm_str_not_empty (NM_DEVICE_VXLAN_GET_PRIVATE (device)->group); + return _nml_coerce_property_str_not_empty (NM_DEVICE_VXLAN_GET_PRIVATE (device)->group); } /** @@ -172,7 +172,7 @@ nm_device_vxlan_get_local (NMDeviceVxlan *device) { g_return_val_if_fail (NM_IS_DEVICE_VXLAN (device), NULL); - return nm_str_not_empty (NM_DEVICE_VXLAN_GET_PRIVATE (device)->local); + return _nml_coerce_property_str_not_empty (NM_DEVICE_VXLAN_GET_PRIVATE (device)->local); } /** |