diff options
author | Thomas Haller <thaller@redhat.com> | 2018-12-01 17:04:18 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-12-11 09:23:47 +0100 |
commit | e60f6ee6d6e970a2aef3e8ffc562ca7a248c6172 (patch) | |
tree | 16655456e1dab4aef91aa7b061119ed1a69fe570 | |
parent | 5ada517b23604b8064b1354187b181ba7869e7b8 (diff) | |
download | NetworkManager-e60f6ee6d6e970a2aef3e8ffc562ca7a248c6172.tar.gz |
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.
-rw-r--r-- | shared/nm-utils/nm-shared-utils.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/nm-utils/nm-shared-utils.h b/shared/nm-utils/nm-shared-utils.h index e82b53f7cb..5a9bb541d6 100644 --- a/shared/nm-utils/nm-shared-utils.h +++ b/shared/nm-utils/nm-shared-utils.h @@ -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 ('?'); } |