shared: allow AF_UNSPEC for nm_utils_addr_family_to_char()

It just makes sense, that our to-char function can also handle AF_UNSPEC.
Unclear which character to return in this case, but "IPvX" seems suitable.
This commit is contained in:
Thomas Haller 2018-12-01 17:04:18 +01:00
parent 5ada517b23
commit e60f6ee6d6

View file

@ -76,8 +76,9 @@ static inline char
nm_utils_addr_family_to_char (int addr_family)
{
switch (addr_family) {
case AF_INET: return '4';
case AF_INET6: return '6';
case AF_UNSPEC: return 'X';
case AF_INET: return '4';
case AF_INET6: return '6';
}
g_return_val_if_reached ('?');
}