mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 05:58:01 +02:00
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:
parent
5ada517b23
commit
e60f6ee6d6
1 changed files with 3 additions and 2 deletions
|
|
@ -76,8 +76,9 @@ static inline char
|
||||||
nm_utils_addr_family_to_char (int addr_family)
|
nm_utils_addr_family_to_char (int addr_family)
|
||||||
{
|
{
|
||||||
switch (addr_family) {
|
switch (addr_family) {
|
||||||
case AF_INET: return '4';
|
case AF_UNSPEC: return 'X';
|
||||||
case AF_INET6: return '6';
|
case AF_INET: return '4';
|
||||||
|
case AF_INET6: return '6';
|
||||||
}
|
}
|
||||||
g_return_val_if_reached ('?');
|
g_return_val_if_reached ('?');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue