mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-21 01:40:33 +01:00
cli: don't use nm_utils_hwaddr_type() to stringify HWADDR
Use nm_utils_hwaddr_ntoa_len() instead of nm_utils_hwaddr_ntoa(). This makes it no longer necessary to determine the type of the MAC address based on the address length. This makes the GETTER more accepting towards other lengths. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
3cda194b44
commit
c4d90c5660
1 changed files with 2 additions and 2 deletions
|
|
@ -880,8 +880,8 @@ vpn_data_item (const char *key, const char *value, gpointer user_data)
|
|||
g_value_init (&val, DBUS_TYPE_G_UCHAR_ARRAY); \
|
||||
g_object_get_property (G_OBJECT (setting), property_name, &val); \
|
||||
array = g_value_get_boxed (&val); \
|
||||
if (array) \
|
||||
hwaddr = nm_utils_hwaddr_ntoa (array->data, nm_utils_hwaddr_type (array->len)); \
|
||||
if (array && array->len) \
|
||||
hwaddr = nm_utils_hwaddr_ntoa_len (array->data, array->len); \
|
||||
g_value_unset (&val); \
|
||||
return hwaddr; \
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue