glib-aux: add nm_ether_addr_is_zero() helper

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

View file

@ -219,6 +219,12 @@ nm_ether_addr_equal(const NMEtherAddr *a, const NMEtherAddr *b)
return nm_ether_addr_cmp(a, b) == 0;
}
static inline gboolean
nm_ether_addr_is_zero(const NMEtherAddr *a)
{
return nm_memeq(a, &nm_ether_addr_zero, sizeof(NMEtherAddr));
}
/*****************************************************************************/
struct ether_addr;