glib-aux: add nm_ether_addr_to_string_dup() helper

This commit is contained in:
Thomas Haller 2022-10-13 10:44:26 +02:00
parent f9cd90f12a
commit 4b35168193
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -2613,6 +2613,9 @@ nm_ether_addr_to_string(const NMEtherAddr *ether_addr, char sbuf[static(sizeof(N
#define nm_ether_addr_to_string_a(ether_addr) \
nm_ether_addr_to_string((ether_addr), g_alloca(sizeof(NMEtherAddr) * 3))
#define nm_ether_addr_to_string_dup(ether_addr) \
((char *) nm_ether_addr_to_string((ether_addr), g_malloc(sizeof(NMEtherAddr) * 3)))
NMEtherAddr *nm_ether_addr_from_string(NMEtherAddr *addr, const char *str);
guint8 *nm_utils_hexstr2bin_full(const char *hexstr,