mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-07-08 20:59:40 +03:00
tests: virnetsockettest: Print the error if getifaddrs fails.
This commit is contained in:
@ -60,8 +60,10 @@ checkProtocols(bool *hasIPv4, bool *hasIPv6,
|
|||||||
*hasIPv4 = *hasIPv6 = false;
|
*hasIPv4 = *hasIPv6 = false;
|
||||||
*freePort = 0;
|
*freePort = 0;
|
||||||
|
|
||||||
if (getifaddrs(&ifaddr) < 0)
|
if (getifaddrs(&ifaddr) < 0) {
|
||||||
|
perror ("getifaddrs");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
|
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
|
||||||
if (!ifa->ifa_addr)
|
if (!ifa->ifa_addr)
|
||||||
|
Reference in New Issue
Block a user