[PATCH 1/3] tests: virnetsockettest: Print the error if getifaddrs fails.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Richard W.M. Jones" <rjones@xxxxxxxxxx>

---
 tests/virnetsockettest.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c
index eda95bc..82c202e 100644
--- a/tests/virnetsockettest.c
+++ b/tests/virnetsockettest.c
@@ -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)
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]