std-aux/trivial: add code comment to NM_IS_IPv4()

This commit is contained in:
Thomas Haller 2023-03-08 14:35:04 +01:00
parent 17935511a5
commit dc5ac4d83c
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -1419,6 +1419,9 @@ nm_utils_addr_family_to_char(int addr_family)
(NM_UNIQ_T(_addr_family, uniq) == NM_AF_INET); \
})
/* NM_IS_IPv4() is guaranteed to give either 0 or 1! That is an important
* guarantee, because we often use that value to index a 2-array (where at
* position zero is IPv6 and at position 1 IPv4). */
#define NM_IS_IPv4(addr_family) _NM_IS_IPv4(NM_UNIQ, addr_family)
static inline int