mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
tests: virnetsockettest: Print the error if getifaddrs fails.
This commit is contained in:
1 parent
fe881ae086
commit
fb004207fa
1 file changed
+3
-1
@@ -60,8 +60,10 @@ checkProtocols(bool *hasIPv4, bool *hasIPv6,
|
||||
*hasIPv4 = *hasIPv6 = false;
|
||||
*freePort = 0;
|
||||
|
||||
if (getifaddrs(&ifaddr) < 0)
|
||||
if (getifaddrs(&ifaddr) < 0) {
|
||||
perror ("getifaddrs");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
|
||||
if (!ifa->ifa_addr)
|
||||
|
||||
Reference in new issue
Block a user