提交 fb004207 编写于 作者: R Richard W.M. Jones

tests: virnetsockettest: Print the error if getifaddrs fails.

上级 fe881ae0
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册